Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Primitives
  2. Scrollable
  3. API and Development

Scrollable

API and Development

View Source
Submit Issue

Scrollable provides a customizable scrollable container with optional scrollbars, supporting both vertical and horizontal scrolling with fine-grained control over scrollbar appearance and behavior. It wraps Radix UI's ScrollArea component, offering a flexible scrolling interface with customizable scrollbar visibility, size options, and automatic scroll positioning. It ensures consistent scrolling patterns across the interface with smooth scrolling behavior and accessibility support.

Props

NameDefaultDescription
childrenrequiredThe content to display inside the scrollable container.
disableHorizontalfalseWhether to disable horizontal scrolling and hide the horizontal scrollbar.
disableVerticalfalseWhether to disable vertical scrolling and hide the vertical scrollbar.
scrollReversefalseWhether to automatically scroll to the bottom when the component mounts.
smallScrollbarfalseWhether to use a smaller scrollbar size.

Basic Scrollable

Use for standard scrollable content areas.

Vertical Scrolling Only

Disable horizontal scrolling for vertical-only content.

Horizontal Scrolling Only

Disable vertical scrolling for horizontal-only content.

Scroll to Bottom

Automatically scroll to the bottom on mount, useful for chat feeds or logs.

Small Scrollbar

Use smaller scrollbars for more compact designs.

With Ref for Programmatic Control

Use refs to control scrolling programmatically.

In Modal Content

Use Scrollable within modals for long content.

In Chat Interfaces

Use Scrollable for chat feeds that scroll to bottom.

Both Scrollbars Disabled

Disable all scrolling when content fits within the container.

Previous

Scrollable / Usage

Next

Scrollable / Accessibility

On this page

Props
Basic Scrollable
Vertical Scrolling Only
Horizontal Scrolling Only
Scroll to Bottom
Small Scrollbar
With Ref for Programmatic Control
In Modal Content
In Chat Interfaces
Both Scrollbars Disabled