Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Scroll Area

A scrolling region with a thin scrollbar styled by the theme, in place of the browser's.

Built on the headless Scroll Area.See its API in Docs

Rendered by React 19.3.1

scroll-area.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/scroll-area.json

It also adds utils. The app needs its setup first: Installation.

Usage

Give ScrollArea a size and put the content inside it. It renders the viewport, a vertical ScrollBar and the corner itself; for content that scrolls across, add <ScrollBar orientation="horizontal" /> inside it. The native scrolling, keyboard and wheel stay the browser's; the scrollbars come from the headless Scroll Area.

import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'

Examples

Default

A list of 50 tags that scrolls down.

Its preview and code are at the top of the page.

Horizontal Scrolling

A row of cards with a horizontal scrollbar.

Rendered by React 19.3.1

scroll-area-horizontal-scrolling.tsx

API reference

The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Scroll Area's API reference.