Dinachi

Scroll Area

A custom scroll container with styled scrollbars and optional corner rendering.

#Installation

npx @dinachi/cli@latest add scroll-area

#Usage

tsx
import {
  ScrollArea,
  ScrollAreaViewport,
  ScrollAreaContent,
  ScrollAreaScrollbar,
  ScrollAreaThumb,
  ScrollAreaCorner,
} from "@/components/ui/scroll-area"

#Examples

Default Scroll Area

A scroll area with a list of items

Horizontal Scroll Area

Scroll area with horizontal scrolling

#API Reference

PropTypeDefaultDescription
ScrollAreaScrollbar.orientation'vertical' | 'horizontal''vertical'Sets scrollbar orientation.
type'hover' | 'scroll' | 'auto' | 'always''hover'Controls when scrollbars are visible.
scrollHideDelaynumber600Delay before auto-hidden scrollbars are hidden again.