Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Scroll Area

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

Tags

v1.2.0-beta.50
v1.2.0-beta.49
v1.2.0-beta.48
v1.2.0-beta.47
v1.2.0-beta.46
v1.2.0-beta.45
v1.2.0-beta.44
v1.2.0-beta.43
v1.2.0-beta.42
v1.2.0-beta.41
v1.2.0-beta.40
v1.2.0-beta.39
v1.2.0-beta.38
v1.2.0-beta.37
v1.2.0-beta.36
v1.2.0-beta.35
v1.2.0-beta.34
v1.2.0-beta.33
v1.2.0-beta.32
v1.2.0-beta.31
v1.2.0-beta.30
v1.2.0-beta.29
v1.2.0-beta.28
v1.2.0-beta.27
v1.2.0-beta.26
v1.2.0-beta.25
v1.2.0-beta.24
v1.2.0-beta.23
v1.2.0-beta.22
v1.2.0-beta.21
v1.2.0-beta.20
v1.2.0-beta.19
v1.2.0-beta.18
v1.2.0-beta.17
v1.2.0-beta.16
v1.2.0-beta.15
v1.2.0-beta.14
v1.2.0-beta.13
v1.2.0-beta.12
v1.2.0-beta.11
v1.2.0-beta.10
v1.2.0-beta.9
v1.2.0-beta.8
v1.2.0-beta.7
v1.2.0-beta.6
v1.2.0-beta.5
v1.2.0-beta.4
v1.2.0-beta.3
v1.2.0-beta.2
v1.2.0-beta.1

Installation

npx logic2b@latest add scroll-area

Usage

import { ScrollArea } from "@/components/ui/scroll-area"

<ScrollArea className="h-72 w-48 rounded-md border">
  Jokester began sneaking into the castle in the middle of the night...
</ScrollArea>

Set the viewport size with className (height/width) — the content scrolls inside it. For horizontal scrolling, render a ScrollBar with orientation="horizontal" inside the ScrollArea.

API

Prop Type Default
type (ScrollArea) auto | always | scroll | hover hover
scrollHideDelay (ScrollArea) number (ms) 600
orientation (ScrollBar) vertical | horizontal vertical

Examples

Horizontal

Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12

Long text

Terms of Service

By accessing this registry you agree to copy, adapt, and ship these components in your own projects without attribution.

Components are provided as-is. You own the code once it lands in your repository and are free to modify every token, variant, and style.

Updates are opt-in: re-run the installer whenever you want the latest version of a component, then reconcile any local changes.

Accessibility primitives are inherited from the underlying libraries. Test your own compositions before shipping to production.