Overlays Core Stable

Sheet

.md

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

Preview

Installation

pnpm add fancy-ui-svelte
import { Sheet } from 'fancy-ui-svelte'

Usage

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

<Sheet />

Examples

Basic Usage

Sides

Slide in from any edge of the viewport.

Pin actions below the body.

Props

PropTypeDefaultDescription
open booleanfalseWhether the sheet is open. Bindable
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 booleantrueWhether 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
ref HTMLDivElement | nullnullBindable element reference to the panel
sound booleanfalsePlays close when the sheet is dismissed, once the user has enabled sound

Slots

SlotDescription
childrenPanel body content
footerContent pinned below the body, e.g. actions