docs/components/layout/ScrollArea

ScrollArea

Custom-scrollbar scroll container.

import { ScrollArea } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#Props

PropTypeDefaultDescription
children *JSX.ElementContent to render inside the scrollable area.
maxHeightstring | numberMaximum height before scrolling (CSS value or pixels).
classstringAdditional CSS classes.
classListRecord<string, boolean | undefined>Reactive class list merged with the base class.
styleJSX.CSSPropertiesInline styles merged onto the outer scroll container. Useful for sizing ScrollArea as a flex child (e.g. <ScrollArea style={{ flex: '1 1 0', 'min-height': 0 }} />) without needing a wrapper Box/Flex.

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-border
  • --sk-scroll-thumb-radius
  • --sk-space-sm
  • --sk-text-muted