StorybookGitHub

Scroll Area

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

Changelog

v2.4.0 — Added dark mode to the Chart component
v2.3.2 — Fixed focus ring on disabled inputs
v2.3.1 — Improved Sidebar collapse animation
v2.3.0 — Introduced the Shimmer component
v2.2.1 — Patched Select scroll button hit area
v2.2.0 — Added RangeCalendar with two-month view
v2.1.0 — Reworked Resizable panel persistence
v2.0.0 — Migrated primitives to reka-ui

Installation

npx shadcn-vue@latest add https://vuedocs.canceydejean.dev/r/scroll-area.json

Usage

Use scroll area when you need a scrollable region with a custom, consistently-styled scrollbar instead of relying on the browser's native one — useful for lists, menus, and long content inside constrained containers.

<script setup lang="ts">
import { ScrollArea } from "@/components/ui/scroll-area";

const tags = Array.from({ length: 20 }, (_, index) => `Tag ${index + 1}`);
</script>

<template>
  <ScrollArea class="h-72 w-48 rounded-md border">
    <div class="p-4">
      <h4 class="mb-4 text-sm font-medium">Tags</h4>
      <div v-for="tag in tags" :key="tag" class="text-sm">
        {{ tag }}
      </div>
    </div>
  </ScrollArea>
</template>

Built on reka-ui's ScrollArea primitive.