sheet-demo

PreviousNext
Docs
takiexample

Preview

Loading preview…
registry/new-york/examples/sheet-demo.tsx
import { Button } from "@/registry/new-york/ui/button"
import { Input } from "@/registry/new-york/ui/input"
import { Label } from "@/registry/new-york/ui/label"
import {
  Sheet,
  SheetContent,
  SheetDescription,
  SheetFooter,
  SheetHeader,
  SheetTitle,
} from "@/registry/new-york/ui/sheet"

export default function SheetDemo() {
  return (
    <Sheet>
      <Button>Outline</Button>
      <SheetContent>
        <SheetHeader>
          <SheetTitle>Edit profile</SheetTitle>
          <SheetDescription>
            Make changes to your profile here. Click save when you&apos;re done.
          </SheetDescription>
        </SheetHeader>
        <div className="grid flex-1 auto-rows-min gap-6 px-4">
          <div className="grid gap-3">
            <Label htmlFor="sheet-demo-name">Name</Label>
            <Input id="sheet-demo-name" defaultValue="Pedro Duarte" />
          </div>
          <div className="grid gap-3">
            <Label htmlFor="sheet-demo-username">Username</Label>
            <Input id="sheet-demo-username" defaultValue="@peduarte" />
          </div>
        </div>
        <SheetFooter>
          <Button type="submit">Save changes</Button>

          <Button variant="outline" slot="close">
            Close
          </Button>
        </SheetFooter>
      </SheetContent>
    </Sheet>
  )
}

Installation

npx shadcn@latest add @taki/sheet-demo

Usage

import { SheetDemo } from "@/components/sheet-demo"
<SheetDemo />