edbnedbn/ui
Get Started
WelcomeWhy We're DifferentChoosing a VariantChangelogLicense
Components
OverviewAlert DialogCheckboxCollapsibleDialogFieldInputMenuNumber FieldPopoverProgressRadioScroll Area
SelectSeparatorSliderSwitchTabsToggleTooltip
Shared Components
InputTextareaCardAvatarTableAlertBreadcrumbPagination
0installs
Components
Maps
GitHub stars
HomeDocsComponentsStaticScroll Area

On this page

Scroll Area

Augments native scroll functionality with custom, styled scrollbars. Built on Base UI ScrollArea primitives.

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

Usage

import {
  ScrollAreaRoot,
  ScrollAreaViewport,
  ScrollAreaScrollbar,
  ScrollAreaThumb,
} from "@/components/ui/static/scroll-area"
<ScrollAreaRoot className="h-72 w-48 rounded-md border">
  <ScrollAreaViewport className="h-full w-full p-4">
    {/* Content */}
  </ScrollAreaViewport>
  <ScrollAreaScrollbar orientation="vertical">
    <ScrollAreaThumb />
  </ScrollAreaScrollbar>
</ScrollAreaRoot>

Installation

Install dependencies

TypeScript
npm install @base-ui/react

Examples

Chat Messages

Team Chat

A
Alice10:00 AM

Hey, how are you?

B
Bob10:02 AM

I'm good! Working on the project.

A
Alice10:03 AM

Nice! Need any help?

B
Bob10:05 AM

Actually, yes! Can you review the PR?

A
Alice10:06 AM

Sure, I'll take a look now.

B
Bob10:07 AM

Thanks! Let me know if you have questions.

A
Alice10:08 AM

Will do!

B
Bob10:10 AM

By the way, the meeting is at 3pm.

A
Alice10:11 AM

Got it, I'll be there.

B
Bob10:12 AM

Perfect! See you then.

Horizontal Scroll

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
Item 10

API Reference

orientation"vertical" | "horizontal"
="vertical"

The scrollbar orientation.

forceMountboolean

Force mount the scrollbar.