# Sheet

> A modal panel that slides in from an edge of the viewport, for settings, filters, or any focused task that doesn't need a full page.

- Package: `fancy-ui-vue` (Vue 3.5+ + Tailwind CSS v4)
- Category: Overlays
- Tags: overlay, sheet, panel, modal, side panel, settings
- Types: `SheetProps`, `SheetSide`, `SheetSize`
- Docs: https://fancy-ui.rama.app/docs/components/sheet
- Source: https://github.com/RamaHerbin/fancy-ui/tree/main/vue/src/components/sheet

## Import

```vue
<script setup lang="ts">
import { Sheet } from 'fancy-ui-vue';
</script>
```

Setup (once per project): `npm install fancy-ui-vue`, then put these lines in your main CSS file (the stylesheet imports go right after `@import "tailwindcss";`):

```css
@import "tailwindcss";
@import "fancy-ui-vue/tailwind.css";
@import "fancy-ui-vue/styles.css";
```

Full guide: https://fancy-ui.rama.app/llms.txt

The names below are the ones to write in a Vue template; when one differs from the Svelte name, the Svelte name follows in parentheses. Snippets become named slots (`#default` is the default snippet), a prop the Vue port declares as a model is a `v-model:<name>` (except `ref`, exposed via `defineExpose({ ref })`: put a template ref on the component and read `.ref`) and callbacks are listeners (`onclick` is `@click`). Every component sets `inheritAttrs: false`: `class` is a declared prop, merged where the Svelte component applies it (not always the root element), and only when the props table below lists it; other attributes do not fall through unless the package README lists the component as forwarding native attributes. Divergences: https://github.com/RamaHerbin/fancy-ui/tree/main/vue#divergences-from-the-svelte-api

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `v-model:open` (Svelte `open`) | `boolean` | `false` | Whether the sheet is open. Bindable |
| `@open-change` (Svelte `onOpenChange`) | `(open: boolean) => void` | — | Called with the new value whenever the sheet opens or closes |
| `side` | `"left" \| "right" \| "top" \| "bottom"` | `"right"` | Edge of the viewport the panel slides in from |
| `title` | `string` | — | Heading rendered in the header and wired to aria-labelledby |
| `description` | `string` | — | Supporting text under the title, wired to aria-describedby |
| `dismissible` | `boolean` | `true` | Whether Escape, the scrim and the close button can close the sheet |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Panel width (left/right sides) or height (top/bottom sides) |
| `class` | `string` | — | Additional CSS classes merged onto the panel |
| `id` | `string` | — | The panel's id, for the aria-controls of a trigger rendered outside the component |
| `ref` | `HTMLDivElement \| null` | `null` | Bindable element reference to the panel |
| `sound` | `boolean` | `false` | Plays close when the sheet is dismissed, once the user has enabled sound |

## Slots

| Slot | Description |
| --- | --- |
| `#default` (Svelte `children`) | Panel body content |
| `#footer` (Svelte `footer`) | Content pinned below the body, e.g. actions |

## Example

```vue
<script setup lang="ts">
import { ref } from "vue";
import { Button, Sheet, Switch } from "fancy-ui-vue";

const open = ref(false);
const notifications = ref(true);
const compactMode = ref(false);
</script>

<template>
	<Button :onclick="() => (open = true)">Open settings</Button>

	<Sheet
		v-model:open="open"
		sound
		title="Settings"
		description="Update your workspace preferences."
	>
		<div class="flex items-center justify-between">
			<span class="text-muted-foreground text-[13px]">Notifications</span>
			<Switch v-model:checked="notifications" sound label="Notifications" />
		</div>
		<div class="flex items-center justify-between">
			<span class="text-muted-foreground text-[13px]">Compact mode</span>
			<Switch v-model:checked="compactMode" sound label="Compact mode" />
		</div>
	</Sheet>
</template>
```
