Drawer
agentmesh/drawer-exampleFreeExample
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/drawer-example.jsonSource
1"use client"23import {4 Example,5 ExampleWrapper,6} from "@/registry/base-vega/components/example"7import { Button } from "@/registry/base-vega/ui/button"8import {9 Drawer,10 DrawerClose,11 DrawerContent,12 DrawerDescription,13 DrawerFooter,14 DrawerHeader,15 DrawerTitle,16 DrawerTrigger,17} from "@/registry/base-vega/ui/drawer"1819export default function DrawerExample() {20 return (21 <ExampleWrapper>22 <DrawerScrollableContent />23 <DrawerWithSides />24 </ExampleWrapper>25 )26}2728const DRAWER_SIDES = ["top", "right", "bottom", "left"] as const2930function DrawerWithSides() {31 return (32 <Example title="Sides">33 <div className="flex flex-wrap gap-2">34 {DRAWER_SIDES.map((side) => (35 <Drawer36 key={side}37 direction={38 side === "bottom" ? undefined : (side as "top" | "right" | "left")39 }40 >41 <DrawerTrigger asChild>42 <Button variant="outline" className="capitalize">43 {side}44 </Button>45 </DrawerTrigger>46 <DrawerContent className="data-[vaul-drawer-direction=bottom]:max-h-[50vh] data-[vaul-drawer-direction=top]:max-h-[50vh]">47 <DrawerHeader>48 <DrawerTitle>Move Goal</DrawerTitle>49 <DrawerDescription>50 Set your daily activity goal.51 </DrawerDescription>52 </DrawerHeader>53 <div className="no-scrollbar overflow-y-auto px-4">54 {Array.from({ length: 10 }).map((_, index) => (55 <p56 key={index}57 className="mb-4 leading-normal style-lyra:mb-2 style-lyra:leading-relaxed"58 >59 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed60 do eiusmod tempor incididunt ut labore et dolore magna61 aliqua. Ut enim ad minim veniam, quis nostrud exercitation62 ullamco laboris nisi ut aliquip ex ea commodo consequat.63 Duis aute irure dolor in reprehenderit in voluptate velit64 esse cillum dolore eu fugiat nulla pariatur. Excepteur sint65 occaecat cupidatat non proident, sunt in culpa qui officia66 deserunt mollit anim id est laborum.67 </p>68 ))}69 </div>70 <DrawerFooter>71 <Button>Submit</Button>72// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion-example | shadcn/ui | Examples | Free | no deps | |
| Alert Dialogalert-dialog-example | shadcn/ui | Examples | Free | no deps | |
| Alertalert-example | shadcn/ui | Examples | Free | no deps | |
| Aspect Ratioaspect-ratio-example | shadcn/ui | Examples | Free | no deps | |
| Avataravatar-example | shadcn/ui | Examples | Free | no deps | |
| Badgebadge-example | shadcn/ui | Examples | Free | no deps | |
| Breadcrumbbreadcrumb-example | shadcn/ui | Examples | Free | no deps | |
| Buttonbutton-example | shadcn/ui | Examples | Free | no deps |
