Overrides
Scroll Area
Extended Features
scrollbarprop — choosevertical(default),horizontal, orboth
Install
Configure your registry in components.json:
{
"registries": {
"@uxio": "https://ui.uxio.dev/r/styles/{style}/{name}.json"
}
}Then run:
npx shadcn@latest add @uxio/scroll-areaUsage
The scrollbar prop controls which scrollbars are shown: "vertical" (default),
"horizontal", or "both".
import { ScrollArea } from "@/components/ui/scroll-area"
export function ScrollAreaVertical() {
return (
<ScrollArea scrollbar="vertical">
{Array.from({ length: 24 }, (_, i) => (
<p key={i}>Row {i + 1}</p>
))}
</ScrollArea>
)
}
export function ScrollAreaHorizontal() {
return (
<ScrollArea scrollbar="horizontal">
<p>{"Long content ".repeat(30)}</p>
</ScrollArea>
)
}
export function ScrollAreaBothAxes() {
return (
<ScrollArea scrollbar="both">
{Array.from({ length: 16 }, (_, i) => (
<p key={i}>
Row {i + 1}
{" …".repeat(50)}
</p>
))}
</ScrollArea>
)
}Examples
Vertical (default)
Shows only the vertical scrollbar, matching the upstream default.
Horizontal
Use scrollbar="horizontal" for wide content inside a fixed-width container.
Both
Use scrollbar="both" when content overflows on both axes.