# Sheet ## Example ```svelte
{#each sides as s (s)} {/each}
{#snippet footer()} {/snippet}
``` ## Documentation ## Usage A `Sheet` slides in from any edge of the screen — useful for forms, filters, or navigation that complements the main content. The API mirrors `Modal`: one component, `bind:open`, plus optional `title`, `description`, and a `footer` snippet for action buttons. ```svelte {#snippet footer()} {/snippet} ``` ## Side Use the `side` prop to pick which edge the sheet slides in from. Values: `top`, `right` (default), `bottom`, `left`. ## Width / height Override the default size with the `class` prop: ```svelte ``` ## Sources This component uses the bits-ui component: Dialog, see here for the documentation for that: https://bits-ui.com/docs/components/dialog/llms.txt ## API Reference ### Sheet A dialog that slides in from the edge of the screen. Built on top of the bits-ui Dialog primitive. | Prop | Type | Default | Description | |------|------|---------|-------------| | open | `boolean` | `false` | Whether the sheet is open. (bindable) | | side | `'top' | 'right' | 'bottom' | 'left'` | `'right'` | Which edge of the screen the sheet slides in from. | | title | `string` | `-` | Optional title rendered in the sheet header. | | description | `string` | `-` | Optional description rendered in the sheet header. | | children | `Snippet` | `-` | The main content of the sheet. (required) | | footer | `Snippet` | `-` | Optional footer snippet, typically containing action buttons. | | closeButton | `boolean` | `true` | Whether to show the close button in the top-right corner. | | interactOutsideBehavior | `'close' | 'ignore'` | `'close'` | How the sheet responds to clicks outside its content. | | onOpenAutoFocus | `(event: Event) => void` | `-` | Callback when focus is moved into the sheet on open. Call event.preventDefault() to prevent default focus behavior. | | contentProps | `Dialog.ContentProps` | `-` | Additional props to pass to the underlying Dialog.Content component. | | onOpenChange | `(open: boolean) => void` | `-` | A callback invoked when the open state changes. | | onOpenChangeComplete | `(open: boolean) => void` | `-` | A callback invoked after the open/close transition completes. | | class | `string` | `-` | Additional CSS classes to apply to the sheet content. |