GitHub

Scroll Area

Custom styled scrollable area

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { ScrollArea } from "@corew500/ui/scroll-area"

<ScrollArea>Content</ScrollArea>

API Reference

Props

PropTypeDefaultDescription
overflowEdgeThresholdenum0The threshold in pixels that must be passed before the overflow edge attributes are applied. Accepts a single number for all edges or an object to configure them individually.
styleenumStyle applied to the element, or a function that returns a style object based on the component’s state.
classNameenumCSS class applied to the element, or a function that returns a class based on the component’s state.
renderenumAllows you to replace the component’s HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.

Accessibility

Keyboard Navigation

  • - Preserves native scrolling behavior and keyboard navigation

Focus Management

  • Focus ring on viewport when focused

Additional

  • Scrollbar is decorative; content remains accessible

Localization

Translatable Content

  • - No text content; localize children as needed

Related

Related Components