Skip to content

Sheet

Extends the Dialog component to display content that complements the main screen.

Examples

Default

vue
<Sheet>
  <SheetTrigger as-child>
    <Button variant="outline">Open</Button>
  </SheetTrigger>
  <SheetContent>
    <SheetHeader>
      <SheetTitle>Edit profile</SheetTitle>
      <SheetDescription>
        Make changes to your profile here. Click save when you're done.
      </SheetDescription>
    </SheetHeader>
    <div class="grid gap-4 py-4">
      <div class="grid grid-cols-4 items-center gap-4">
        <label for="name" class="text-right text-sm">
          Name
        </label>
        <input
          id="name"
          value="Pedro Duarte"
          class="col-span-3 h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
        />
      </div>
      <div class="grid grid-cols-4 items-center gap-4">
        <label for="username" class="text-right text-sm">
          Username
        </label>
        <input
          id="username"
          value="@peduarte"
          class="col-span-3 h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
        />
      </div>
    </div>
    <SheetFooter>
      <SheetClose as-child>
        <Button type="submit">Save changes</Button>
      </SheetClose>
    </SheetFooter>
  </SheetContent>
</Sheet>

Props

Sheet

PropTypeDefaultDescription
openboolean-The controlled open state of the sheet.
defaultOpenbooleanfalseThe open state of the sheet when it is initially rendered.
modalbooleantrueThe modality of the sheet.

Slots

Sheet

SlotDescription
defaultThe content of the sheet.

SheetTrigger

SlotDescription
defaultThe content of the trigger.

SheetContent

SlotDescription
defaultThe content of the sheet.

SheetHeader

SlotDescription
defaultThe header content.

SheetFooter

SlotDescription
defaultThe footer content.

SheetTitle

SlotDescription
defaultThe title content.

SheetDescription

SlotDescription
defaultThe description content.