shadcn-vue/apps/www/src/content/docs/components/sheet.md
2023-09-04 22:36:40 +08:00

1.2 KiB

title description source primitive
Sheet Extends the Dialog component to display content that complements the main content of the screen. https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/lib/registry/default/ui/dialog https://www.radix-vue.com/components/dialog.html

Installation

npx shadcn-vue@latest add sheet
  1. Install radix-vue:
npm install radix-vue
  1. Copy and paste the component source files linked at the top of this page into your project.

Usage

<script setup lang="ts">
import {
  Sheet,
  SheetContent,
  SheetDescription,
  SheetHeader,
  SheetTitle,
  SheetTrigger,
} from '@/lib/registry/default/ui/sheet'
</script>

<template>
  <Sheet>
    <SheetTrigger>Open</SheetTrigger>
    <SheetContent>
      <SheetHeader>
        <SheetTitle>Are you sure absolutely sure?</SheetTitle>
        <SheetDescription>
          This action cannot be undone. This will permanently delete your account
          and remove your data from our servers.
        </SheetDescription>
      </SheetHeader>
    </SheetContent>
  </Sheet>
</template>