Scroll Area
A region that scrolls with the platform's own scrolling and an overlay scrollbar: a 4 px #c8c8c8 thumb that floats over the content's edge, never takes its space, and fades out when you stop scrolling and the pointer leaves.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { ScrollArea } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
- Activity 1
- Activity 2
- Activity 3
- Activity 4
- Activity 5
- Activity 6
- Activity 7
- Activity 8
- Activity 9
- Activity 10
- Activity 11
- Activity 12
Props
horizontal
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use it for every region that scrolls, like a contact's activity or a long list in a panel. The scrollbar floats over the content and takes none of its width. |
| Do | Give it a height, a max-h-* or a flex-1 parent in a dialog or drawer body. Without one it grows with its content and never scrolls. |
| Do | Set inList inside a menu or listbox, so the area is never a tab stop between the list and its rows. |
| Do | Set aria-label, like "Activity", when the region holds focusable content of its own, so a keyboard user knows where they are. |
| Don't | Use overflow-auto or overflow-scroll. The operating system draws its own track, which takes width from the content, and lint rejects it. |
| Don't | Set horizontal to fit a wide table into a narrow panel when the columns could wrap or drop. Sideways scrolling hides columns the reader can't tell are there. |
Props
ScrollArea takes ui-sdk's Scroll Area options: type (hover by default, or scroll, auto, always), scrollHideDelay, stickToEnd and controller.
ScrollArea
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | What it shows inside. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
| scrollbarClassName | string | — | Classes for the vertical scrollbar, like a top inset under a sticky header. |
| horizontal | boolean | false | Adds a horizontal scrollbar, for content wider than the area. |
| aria-label | string | — | Names the scrollable region when it holds focusable content of its own, like "Activity". |
| inList | boolean | false | Set inside a menu or listbox that moves its own highlight. Its arrow keys already scroll the highlight into view, so the area never becomes a tab stop, and it joins the list as an unnamed group so the list's structure stays valid (a focusable box isn't allowed between a list and its rows). |
ScrollBar
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
| orientation | unknown | "vertical" |
Code
What the playground shows, ready to copy.
import { ScrollArea } from "@leap-crm/design-system";
<ScrollArea className="h-40" aria-label="Activity">
{activity}
</ScrollArea>Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| Tab | Goes to the content: a scroll area with focusable content is no tab stop itself. |





