Components
Scroll area
Radix wrapper with custom native-like scrollbars that match the DS (thin, rounded, muted). Use for constrained scrollable regions inside cards, sheets, or menus.
Updated Jul 10, 2026 by Leonardo Posada
Variants
<ScrollArea className="h-40 w-64 rounded-md border p-4">
{items.map((item) => (
<div key={item} className="py-1 text-sm">{item}</div>
))}
</ScrollArea>When to use
- Long lists inside a Sheet or Popover.
- Table wrappers that need horizontal scroll on narrow viewports.
When not to use
- Page-level scroll — the browser handles that.
- For a single overflow-x — a plain overflow-x-auto is enough.
Usage
Do
- Set a max height on the wrapper so the scrollbar actually appears.
Don't
- Don't rely on ScrollArea for accessibility of long content — provide a way to see all rows.