Overlays Core Stable

Drawer

A modal bottom sheet with a grab handle, draggable shut with a downward swipe — for filters, quick actions, or any touch-first task

Preview

Installation

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

Usage

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

<Drawer />

Examples

Basic Usage

With Form

House form fields with a pinned footer.

No Swipe

Disable the drag-to-close gesture.

Props

PropTypeDefaultDescription
open booleanfalseWhether the drawer is open. Bindable
onOpenChange (open: boolean) => void-Called with the new value whenever the drawer opens or closes
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, the close button and the swipe gesture can close the drawer
swipeToClose booleantrueWhether dragging the handle down past the threshold closes the drawer
class string-Additional CSS classes merged onto the panel
ref HTMLDivElement | nullnullBindable element reference to the panel

Slots

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