Components
Loading preview...
A panel that slides in from the edge of the screen with swipe gestures, snap points, and nested drawer support. Supports bottom, top, left, and right positions with default, inset, and straight variants.
npx shadcn@latest add https://21st.dev/r/coss.com/drawerimport {
Button,
Drawer,
DrawerClose,
DrawerDescription,
DrawerFooter,
DrawerHeader,
DrawerPopup,
DrawerTitle,
DrawerTrigger,
} from "@/components/ui/drawer";
export default function Particle() {
return (
<div className="flex items-center justify-center w-full min-h-screen bg-background p-8">
<Drawer>
<DrawerTrigger render={<Button variant="outline" />}>
Open drawer
</DrawerTrigger>
<DrawerPopup showBar>
<DrawerHeader className="text-center">
<DrawerTitle>Notifications</DrawerTitle>
<DrawerDescription>
This is the description of the drawer.
</DrawerDescription>
</DrawerHeader>
<DrawerFooter
className="justify-center sm:justify-center"
variant="bare"
>
<DrawerClose render={<Button variant="outline" />}>Close</DrawerClose>
</DrawerFooter>
</DrawerPopup>
</Drawer>
</div>
);
}