Skip to content
shadcn.io
shadcn.io is not affiliated with official shadcn/ui

Shadcn Scroll Area for React and Tailwind

Custom scrollable area with styled scrollbars.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/scroll-area.json

Usage

import { ScrollArea } from "@/components/ui/scroll-area";
<ScrollArea className="h-64">
  {/* Your content here */}
</ScrollArea>

Examples

Scroll Fade

Use scrollFade to add a subtle fade effect to the edges of the scroll area.

Horizontal Scroll

Both Scrollbars

Nested

Scroll areas can be nested within each other for complex layouts.

API Reference

ScrollArea

Custom-styled scrollable region. Hides native scrollbars; preserves scroll behavior.

PropTypeDefault
scrollFadebooleanfalse
AttributeDefault
--fade-size1.5rem

For a complete list of props, see the Ark UI documentation.