For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.0/en/components/scroll-area.md.

Scroll Area

Scroll Area bounds long content while preserving its reading order and a discoverable, native-feeling scroll path.

Live preview

Tags

v1.2.0-beta.50
v1.2.0-beta.49
v1.2.0-beta.48
v1.2.0-beta.47
v1.2.0-beta.46
v1.2.0-beta.45
v1.2.0-beta.44
v1.2.0-beta.43
v1.2.0-beta.42
v1.2.0-beta.41
v1.2.0-beta.40
v1.2.0-beta.39
v1.2.0-beta.38

Usage

Include CSS

Import Tailwind and one full A3S UI style bundle.

@import "tailwindcss";
@import "@a3s-lab/ui/a3s.css";

Or import only the base CSS and one style pack.

@import "tailwindcss";
@import "@a3s-lab/ui/base.css";
@import "@a3s-lab/ui/styles/a3s.css";

Scroll Area uses A3S UI scrollbar component classes.

Using CDN or bundler imports? See the Installation page.

Add your scroll area HTML

Use scrollbar or scrollbar-sm on an element that already scrolls with overflow-auto, overflow-y-auto, or overflow-x-auto.

<div class="scrollbar h-72 overflow-y-auto rounded-md border p-4">
  Your scrollable content here.
</div>

Use scrollbar or scrollbar-sm on an element that already scrolls with overflow-auto, overflow-y-auto, or overflow-x-auto.

The component class augments native scrolling for cross-browser styling. It does not wrap content, replace browser scroll behavior, or require JavaScript. Hosts that need keyboard scrolling should keep the overflow element focusable (tabindex="0" or a native control).

Examples

These examples use Card as the framed surface so border and radius come from the active style pack.

Horizontal

Use scrollbar with overflow-x-auto for horizontal scrolling.

Live preview
Photo by Ornella Binni
Photo by Tom Byrom
Photo by Vladimir Malyavko

Thin

Use scrollbar-sm for compact scrollable regions like menus, listboxes, sidebars, and command results.

Live preview
Recent files

RTL

Set dir="rtl" on the scrollable element or one of its ancestors to use right-to-left layout.

Live preview

العلامات

v1.2.0-beta.50
v1.2.0-beta.49
v1.2.0-beta.48
v1.2.0-beta.47
v1.2.0-beta.46
v1.2.0-beta.45
v1.2.0-beta.44
v1.2.0-beta.43
v1.2.0-beta.42
v1.2.0-beta.41
v1.2.0-beta.40
v1.2.0-beta.39
v1.2.0-beta.38