Overflow container with a thin, theme-aware scrollbar. Give it an explicit height (for example class="h-64") so the inner content can scroll.
Run the following command to add this component to your project:
npx base-ui-cli add scroll-area
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.
npx -y base-ui-mcp
Base UI provides standalone components. Import the exact elements you want to use into your component.
// Install: npx base-ui-cli add scroll-area
// Paths are relative to aliases.components (default: src/app/components)
import { ScrollAreaComponent } from './scroll-area/scroll-area.component';
@Component({
selector: 'app-your-component',
imports: [
ScrollAreaComponent
],
template: `...`
})
export class YourComponent {} API for scroll-area — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
base-scroll-area | — | — | — | Overflow container with a thin, theme-aware scrollbar. Give it an explicit height (for example `class="h-64"`) so the inner content can scroll. |
base-scroll-area | class | string | '' | Extra host classes merged via `cn()`. Include a height so overflow can scroll. |
Content