···11+## Usage
22+33+A `Sheet` slides in from any edge of the screen — useful for forms, filters, or navigation that complements the main content.
44+55+The API mirrors `Modal`: one component, `bind:open`, plus optional `title`, `description`, and a `footer` snippet for action buttons.
66+77+```svelte
88+<Button onclick={() => (open = true)} variant="secondary">Open</Button>
99+1010+<Sheet
1111+ bind:open
1212+ side="right"
1313+ title="Edit profile"
1414+ description="Make changes to your profile here."
1515+>
1616+ <!-- main content -->
1717+1818+ {#snippet footer()}
1919+ <Button variant="secondary" onclick={() => (open = false)}>Cancel</Button>
2020+ <Button onclick={() => (open = false)}>Save changes</Button>
2121+ {/snippet}
2222+</Sheet>
2323+```
2424+2525+## Side
2626+2727+Use the `side` prop to pick which edge the sheet slides in from. Values: `top`, `right` (default), `bottom`, `left`.
2828+2929+## Width / height
3030+3131+Override the default size with the `class` prop:
3232+3333+```svelte
3434+<Sheet bind:open class="sm:max-w-lg">
3535+ <!-- wider sheet on larger screens -->
3636+</Sheet>
3737+```
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Sheet',
66+ description:
77+ 'A dialog that slides in from the edge of the screen. Built on top of the bits-ui Dialog primitive.',
88+ props: {
99+ open: {
1010+ type: 'boolean',
1111+ description: 'Whether the sheet is open.',
1212+ default: 'false',
1313+ bindable: true
1414+ },
1515+ side: {
1616+ type: { type: 'enum', definition: "'top' | 'right' | 'bottom' | 'left'" },
1717+ description: 'Which edge of the screen the sheet slides in from.',
1818+ default: "'right'"
1919+ },
2020+ title: {
2121+ type: 'string',
2222+ description: 'Optional title rendered in the sheet header.'
2323+ },
2424+ description: {
2525+ type: 'string',
2626+ description: 'Optional description rendered in the sheet header.'
2727+ },
2828+ children: {
2929+ type: 'Snippet',
3030+ description: 'The main content of the sheet.',
3131+ required: true
3232+ },
3333+ footer: {
3434+ type: 'Snippet',
3535+ description: 'Optional footer snippet, typically containing action buttons.'
3636+ },
3737+ closeButton: {
3838+ type: 'boolean',
3939+ description: 'Whether to show the close button in the top-right corner.',
4040+ default: 'true'
4141+ },
4242+ interactOutsideBehavior: {
4343+ type: { type: 'enum', definition: "'close' | 'ignore'" },
4444+ description: 'How the sheet responds to clicks outside its content.',
4545+ default: "'close'"
4646+ },
4747+ onOpenAutoFocus: {
4848+ type: { type: 'function', definition: '(event: Event) => void' },
4949+ description:
5050+ 'Callback when focus is moved into the sheet on open. Call event.preventDefault() to prevent default focus behavior.'
5151+ },
5252+ contentProps: {
5353+ type: 'Dialog.ContentProps',
5454+ description: 'Additional props to pass to the underlying Dialog.Content component.'
5555+ },
5656+ onOpenChange: {
5757+ type: { type: 'function', definition: '(open: boolean) => void' },
5858+ description: 'A callback invoked when the open state changes.'
5959+ },
6060+ onOpenChangeComplete: {
6161+ type: { type: 'function', definition: '(open: boolean) => void' },
6262+ description: 'A callback invoked after the open/close transition completes.'
6363+ },
6464+ class: {
6565+ type: 'string',
6666+ description: 'Additional CSS classes to apply to the sheet content.'
6767+ }
6868+ }
6969+ }
7070+] satisfies APISchema[];
+21
apps/docs/src/lib/docs/core/sheet/index.ts
···11+import Docs from './Documentation.md';
22+import Example from './Example.svelte';
33+import Card from './Card.svelte';
44+import api from './api';
55+66+export default {
77+ slug: 'sheet',
88+ title: 'Sheet',
99+ docs: Docs,
1010+ example: Example,
1111+ card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/dialog',
1616+ label: 'bits-ui dialog',
1717+ package: 'bits-ui',
1818+ component: 'Dialog'
1919+ }
2020+ ]
2121+};
+2
packages/core/src/lib/components/index.ts
···2020export * from './paragraph';
2121export * from './popover';
2222export * from './prose';
2323+export * from './radio-group';
2324export * from './scroll-area';
2425export * from './select';
2626+export * from './sheet';
2527export * from './sidebar';
2628export * from './slider';
2729export * from './sonner';
···11+export { default as RadioGroup } from './radio-group.svelte';
22+export { default as RadioGroupItem } from './radio-group-item.svelte';
33+export type {
44+ RadioGroupProps,
55+ RadioGroupOption
66+} from './radio-group.svelte';
77+export type {
88+ RadioGroupItemProps,
99+ RadioGroupItemVariant,
1010+ RadioGroupItemSize
1111+} from './radio-group-item.svelte';
1212+export { radioGroupItemVariants } from './radio-group-item.svelte';