56 lines
1.2 KiB
Markdown
56 lines
1.2 KiB
Markdown
---
|
|
title: Sheet
|
|
description: Extends the Dialog component to display content that complements the main content of the screen.
|
|
source: https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/lib/registry/default/ui/dialog
|
|
primitive: https://www.radix-vue.com/components/dialog.html
|
|
---
|
|
|
|
<ComponentPreview name="SheetDemo" />
|
|
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
npx shadcn-vue@latest add sheet
|
|
```
|
|
|
|
<ManualInstall>
|
|
|
|
1. Install `radix-vue`:
|
|
|
|
```bash
|
|
npm install radix-vue
|
|
```
|
|
|
|
2. Copy and paste the component source files linked at the top of this page into your project.
|
|
</ManualInstall>
|
|
|
|
## Usage
|
|
|
|
```vue
|
|
<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>
|
|
``` |