Fractal UI Motif Fractal UI Type
On this Page

DrawerContent

DrawerContent is an explicit alias of SheetContent. It renders the modal dialog surface controlled by the nearest DrawerRoot and closes when its backdrop is selected or the dialog is cancelled.

Usage

Svelte
<script lang="ts">
	import { DrawerContent, DrawerRoot, DrawerTrigger } from 'fractalsvelte';
</script>

<DrawerRoot>
	<DrawerTrigger>Open details</DrawerTrigger>
	<DrawerContent side="left">Project details</DrawerContent>
</DrawerRoot>

API

PropTypeDefaultDescription
side'top' \| 'right' \| 'bottom' \| 'left''right'Screen edge from which the drawer surface opens.
childrenSnippetrequiredContent rendered inside the modal dialog surface.

Render DrawerContent beneath DrawerRoot; use DrawerClose inside it for an explicit close action.