Skip to main content

Installation

Usage

Component API

ScrollArea

Custom scrollable area with styled scrollbars. Built on Radix UI ScrollArea.
Features:
  • Custom styled scrollbars
  • Cross-browser consistent appearance
  • Automatically includes vertical scrollbar
  • Focuses on viewport with keyboard navigation

ScrollBar

Custom scrollbar component for horizontal scrolling.
Props:
  • orientation - Scrollbar orientation ("vertical" | "horizontal")

Implementation

The component structure:

Examples

Basic Scroll Area

Vertical scrollable content:

Horizontal Scroll

Horizontal scrollable content:

Both Scrollbars

Both horizontal and vertical scrolling:

With Header

Scrollable content with a fixed header:

Chat Interface

Scrollable chat messages:

Styling

The scrollbar can be customized with CSS:

Accessibility

  • Maintains native scrolling behavior
  • Keyboard navigation supported (arrow keys, page up/down)
  • Focus management on viewport
  • Screen reader accessible

API Reference

See the Radix UI ScrollArea documentation for complete API reference.