120k

Scroll Area

Augments native scroll functionality for custom, cross-browser styling.

Installation

pnpm dlx shadcn@latest add @force-ui-svelte/scroll-area

Usage

<script lang="ts">
  import { ScrollArea } from "$lib/components/ui/scroll-area/index.js";
</script>
<ScrollArea class="h-[200px] w-[350px] rounded-md border p-4">
  Your scrollable content here.
</ScrollArea>

Composition

Use the following composition to build a ScrollArea:

ScrollArea
└── ScrollBar

Examples

Horizontal

Use orientation="horizontal" for horizontal scrolling.

RTL

To enable RTL support in Force UI, see the RTL configuration guide.

API Reference

See the Radix UI Scroll Area documentation.