# Drawer

Use drawer for bottom (or edge) panels on mobile and secondary flows. Compose with trigger,
content, header, and footer. Set `direction` on `Drawer.Root` to `top`, `right`, `bottom`, or `left`.

```svelte
<script lang="ts">
	import * as Drawer from '~/components/drawer';
	import { Button, buttonVariants } from '~/components/button';
</script>

<Drawer.Root>
	<Drawer.Trigger class={buttonVariants({ variant: 'outline' })}>Open</Drawer.Trigger>
	<Drawer.Content>
		<Drawer.Header>
			<Drawer.Title>Are you absolutely sure?</Drawer.Title>
			<Drawer.Description>This action cannot be undone.</Drawer.Description>
		</Drawer.Header>
		<Drawer.Footer>
			<Button>Submit</Button>
			<Drawer.Close class={buttonVariants({ variant: 'outline' })}>Cancel</Drawer.Close>
		</Drawer.Footer>
	</Drawer.Content>
</Drawer.Root>
```