Scroll Area

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 Basecoat style bundle.

@import "tailwindcss";
@import "basecoat-css/vega.css";

Or import only the base CSS and one style pack.

@import "tailwindcss";
@import "basecoat-css/base.css";
@import "basecoat-css/styles/vega.css";

Scroll Area uses Basecoat base scrollbar utilities and has no dedicated component CSS file.

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 utility augments native scrolling for cross-browser styling. It does not wrap content, replace browser scroll behavior, or require JavaScript.

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.

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.

Recent files

RTL

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

العلامات

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