sigilUI

Scroll Area

Contain overflowing content with a styled scrollbar.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { ScrollArea } from "@sigil-ui/components";

Usage

<ScrollArea className="h-32 w-48 rounded-[var(--s-radius-md,6px)] border border-[color:var(--s-border)]">
    <div className="p-4">Scrollable content goes here. Add more text to see scrolling behavior.</div>
  </ScrollArea>

Props

PropTypeDefaultDescription
orientationScrollbarOrientationverticalOrientation of the scrollbar.
scrollbarSizenumber | string—Override token-driven scrollbar thickness for this instance.
scrollbarClassNamestring—Additional classes for the scrollbar track.
thumbClassNamestring—Additional classes for the scrollbar thumb.

Token integration

CSS VariablePurpose
--s-scrollbar-cornerScrollbar corner
--s-scrollbar-trackScrollbar track
--s-scrollbar-radiusScrollbar radius
--s-radius-fullRadius full
--s-scrollbar-paddingScrollbar padding
--s-duration-fastDuration fast
--s-scrollbar-widthScrollbar width
--s-scrollbar-borderScrollbar border
--s-scrollbar-heightScrollbar height
--s-scrollbar-thumbScrollbar thumb
--s-borderBorder
--s-scrollbar-thumb-hoverScrollbar thumb hover