Native scrolling inside a Radix scroll area with a dithered track and thumb.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- radix-ui
Code
"use client";
import { ScrollArea } from "@/registry/ui/scroll-area";
import { Separator } from "@/registry/ui/separator";
const tags = Array.from({ length: 40 }, (_, i) => `v1.2.0-beta.${40 - i}`);
export default function ScrollAreaDemo() {
return (
<ScrollArea type="always" style={{ width: 200, height: 220 }}>
<div style={{ padding: 12, fontSize: 14 }}>
<div style={{ marginBottom: 12, fontWeight: 500 }}>Tags</div>
{tags.map((t) => (
<div key={t}>
{t}
<Separator style={{ margin: "6px 0" }} />
</div>
))}
</div>
</ScrollArea>
);
}
































