Fractal UI Motif Fractal UI Type
On this Page

DrawerTrigger

DrawerTrigger is the compound Drawer trigger. It is an explicit alias of SheetTrigger and sets the nearest DrawerRoot’s open state to true.

Usage

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

<DrawerRoot>
	<DrawerTrigger>Open navigation</DrawerTrigger>
	<DrawerContent>Navigation links</DrawerContent>
</DrawerRoot>

API

PropTypeDefaultDescription
childrenSnippetrequiredContent rendered inside the native trigger button.

DrawerTrigger must be rendered beneath DrawerRoot. Use DrawerContent for the surface it opens.