A shadcn-style scroll area component built with Ark UI primitives.

Installation

npx shadcn@latest add @ark-cn/scroll-area

Usage

import * as ScrollArea from "@/components/ui/scroll-area"

Read exported parts in src/components/ui/scroll-area.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Basic

Horizontal

Both directions

Nested

Root provider

Tags

Scroll fade

Horizontal items

Scrollbar gutter

Scroll context

API reference

This component mirrors the upstream Ark UI primitive. All props and DOM behavior are defined by Ark unless you see an ark-cn-only row below.

ScrollArea

PropTypeDescription
scrollFade?booleanApplies a vertical fade mask on the viewport.
scrollbarGutter?booleanReserves inline end space for scrollbar stability.

ScrollAreaRoot

PropTypeDescription
scrollbarVisibility?"hover" | "always"Controls scrollbar opacity/pointer behavior.

See the ARK UI documentation for the full API.