
Custom scrollbar container with cross-browser styling.
npx shadcn@latest add https://ui.edbn.me/r/scroll-area.jsonGroups all parts of the scroll area. Renders a div element.
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
The scrollable viewport area. Renders a div element.
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
A custom scrollbar that overlays the viewport. Renders a div element.
orientation'horizontal' | 'vertical''vertical'Scrollbar direction
keepMountedbooleanfalseKeep in DOM when not scrollable
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
| Attribute | Description |
|---|---|
| data-orientation | Scrollbar orientation |
| data-scrolling | Present while scrolling |
| Variable | Description |
|---|---|
| --scroll-area-thumb-height | Calculated thumb height (vertical) |
| --scroll-area-thumb-width | Calculated thumb width (horizontal) |
The draggable scrollbar thumb. Renders a div element.
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
The corner between horizontal and vertical scrollbars. Renders a div element.
classNamestring | functionCSS class name
renderReactElement | functionCustom render function