A Vaul bottom drawer with a dithered drag handle, scrim and frame.
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
- vaul
Code
"use client";
import { Button } from "@/registry/ui/button";
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from "@/registry/ui/drawer";
import { Slider } from "@/registry/ui/slider";
export default function DrawerDemo() {
return (
<Drawer>
<DrawerTrigger asChild>
<Button variant="outline">Set contrast</Button>
</DrawerTrigger>
<DrawerContent>
<div style={{ display: "grid", gap: 16, width: "100%", maxWidth: 360, margin: "0 auto" }}>
<DrawerHeader>
<DrawerTitle>Contrast</DrawerTitle>
<DrawerDescription>Drag the handle down to dismiss.</DrawerDescription>
</DrawerHeader>
<Slider defaultValue={[60]} aria-label="Contrast" />
<DrawerFooter>
<DrawerClose asChild>
<Button>Apply</Button>
</DrawerClose>
</DrawerFooter>
</div>
</DrawerContent>
</Drawer>
);
}
































