Scroll area
Scroll area component with slim custom scrollbars that look the same in every browser, vertical, horizontal or both.
How to use it
Run npx @blossomui/react add scroll-area, or copy src/components/UI/ScrollArea/ScrollArea.tsx into your React project and import it.
import { ScrollArea } from './components/ui/ScrollArea'Props
ScrollAreaProps
| Prop | Type | Description |
|---|---|---|
| children (required) | ReactNode | |
| orientation | 'vertical' | 'horizontal' | 'both' | Which directions scroll. |
| visibility | 'hover' | 'scroll' | 'always' | When the bars are visible: `hover` while the pointer is over the area, `scroll` while it moves, `always` all the time. |
| color | string | Accent color of the bar when it is dragged: any CSS color. Without it the component uses `--blossom-accent`. |
| label | string | Accessible name of the scrollable region. |
| className | string | Give it a size here, for example `h-64`. The content scrolls inside it. |