ScrollArea
Keyboard-focusable overflow container using native scrollbars. Import from @agent-ui/react or a direct subpath. Tailwind CSS v4 theme tokens are required.
ScrollArea ships with a full API table, a copyable example, and accessibility notes.
Step 1: Example log entry
Step 2: Example log entry
Step 3: Example log entry
Step 4: Example log entry
Step 5: Example log entry
Step 6: Example log entry
Step 7: Example log entry
Step 8: Example log entry
Step 9: Example log entry
Step 10: Example log entry
Step 11: Example log entry
Step 12: Example log entry
Installation
Install the package once, then import ScrollArea from its direct entry point or from the root.
pnpm add @agent-ui/reactimport { ScrollArea } from "@agent-ui/react/scroll-area";Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
The example below is the same code that renders the preview. Copy it, swap in your own handlers, and ship.
import { ScrollArea } from "@agent-ui/react"; <ScrollArea className="max-h-40">Long content</ScrollArea>API reference
Every prop ScrollArea accepts, its type, default, and behaviour.
| Name | Type | Default | Description |
|---|---|---|---|
| tabIndex | React prop | — | Configuration exposed through the component's public React props. |
| className | React prop | — | Configuration exposed through the component's public React props. |
Accessibility
ScrollArea composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
3 lines · copy-ready