Skip to content
Ballpoint

Scroll Area

A scrolling region with its scrollbars drawn by hand: a faint pen line for the track, a heavier doubled one for the thumb.

From shadcn/ui
Built on Base UI Scroll Area

Installation

pnpm dlx shadcn@latest add @ballpoint/scroll-area

Usage

tsx
import { ScrollArea } from "@/components/ui/scroll-area"

<ScrollArea className="h-72 w-56">
  …long content…
</ScrollArea>

Examples

Horizontal

A row of pictures that scrolls sideways.

Both directions

Both scrollbars on content wider and taller than the area.

API reference

className
string

Size the area (a height or width is needed for it to scroll).

seed
string | number

Pins the drawing of the scrollbars.

Every other prop goes to Base UI's Scroll Area.

Pen settings

The drawing also takes weight and speed, as props or from the nearest InkProvider. What each one does.