BetaPublic beta — Read the release notes
Documentation

Scroll Area

Custom-styled scrollbar with native scrolling performance.

Package
@solidiom/scroll-area
Version
0.0.1-next.0
Status
stable

Preview

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
Item 10
Item 11
Item 12
Item 13
Item 14
Item 15
Item 16
Item 17
Item 18
Item 19
Item 20

This preview uses documentation-only styling. Ship with one of the included recipe outputs (CSS, Tailwind, or UnoCSS) for production styles.

Custom-styled scrollbar with native scrolling performance.

Usage

Compose Root, Viewport, Scrollbar, Thumb.

import * as ScrollArea from "@solidiom/scroll-area"

;<ScrollArea.Root>Scroll Area content</ScrollArea.Root>

Installation

Install the package with pnpm add @solidiom/scroll-area. The package requires compatible solid-js and @solidjs/web peer dependencies.

Parts

Scroll Area exposes 4 parts:

  • Rootdata-part="root".
  • Viewportdata-part="viewport".
  • Scrollbardata-part="scrollbar".
  • Thumbdata-part="thumb".

Styling

Scroll Area carries data-scope="scroll-area" and data-part attributes on each part for CSS/recipe targeting. State attributes like data-state, data-disabled, and data-highlighted are exposed where applicable.

Keyboard & behavior

This primitive has no keyboard interaction. It renders content that does not independently receive focus or respond to key events.

Composition

Scroll Area is designed to compose with other primitives. Its parts can be combined with Field, Button, or other primitives as needed.

SSR and hydration

Scroll Area renders as semantic HTML during server rendering. Interactive behavior (keyboard handlers, state management) activates on hydration without layout shift.