Scroll Area — Vanilla
Scrollable area with themed scrollbar. Ensure Rizzo CSS is loaded.
Scroll Area
Give the wrapper a fixed height (or width for horizontal). Use scroll-area and scroll-area__viewport. Add scroll-area--horizontal for horizontal scrolling.
Add this component
The command below includes <strong>ScrollArea</strong>—run it in your project directory to install this component (and the CSS if needed). No prompts.
Choose your package manager — click a tab to select, then copy the command.
npm pnpm yarn bun
Live example
HTML
html html
<div class="scroll-area" style="height: 18rem; width: 12rem;">
<div class="scroll-area__viewport" tabindex="0">
<div style="padding: var(--spacing-4);">
<h4 style="margin: 0 0 var(--spacing-4) 0; font-size: var(--font-size-sm); font-weight: 600;">Tags</h4>
<div style="font-size: var(--font-size-sm); margin-bottom: var(--spacing-2);">v1.2.0-beta.20</div>
<div style="font-size: var(--font-size-sm); margin-bottom: var(--spacing-2);">v1.2.0-beta.19</div>
<!-- ... -->
</div>
</div>
</div>