Skip to content
synccn

Scroll Area

Slim scrollbars with edge fades that show there's more.

Releases

v2.40.0
v2.39.0
v2.38.0
v2.37.0
v2.36.0
v2.35.0
v2.34.0
v2.33.0
v2.32.0
v2.31.0
v2.30.0
v2.29.0
v2.28.0
v2.27.0
v2.26.0
v2.25.0
v2.24.0
v2.23.0
v2.22.0
v2.21.0
v2.20.0
v2.19.0
v2.18.0
v2.17.0
v2.16.0
v2.15.0
v2.14.0
v2.13.0
v2.12.0
v2.11.0
v2.10.0
v2.9.0
v2.8.0
v2.7.0
v2.6.0
v2.5.0
v2.4.0
v2.3.0
v2.2.0
v2.1.0
Swatch 1
Swatch 2
Swatch 3
Swatch 4
Swatch 5
Swatch 6
Swatch 7
Swatch 8
Swatch 9
Swatch 10

Installation

$ pnpm dlx shadcn@latest add @synccn/scroll-area

First time in this project? Connect synccn with one command.

Usage

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

API reference

Generated from the component's TypeScript types, so it always matches the code.

ScrollArea

Scroll container with a slim scrollbar and edge fades that appear only when there's more to see.

  • orientation
    "vertical" | "horizontal"

    Default "vertical"

    Scroll direction.

  • fade
    boolean

    Default true

    Fade edges that have more content.

  • className
    string

    Extra classes for the root element.

  • children
    React.ReactNode

    Content to render.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA roles: progressbar
  • ARIA attributes: aria-label, aria-valuemax, aria-valuemin, aria-valuenow
  • Shows a visible focus ring for keyboard users