# Alert Dialog

Use alert dialog for destructive or high-impact actions that need confirmation before continuing.
Compose with `Trigger`, `Content`, `Header`, `Title`, `Description`, `Footer`, `Cancel`, and `Action`.

```svelte
<script lang="ts">
	import * as AlertDialog from '~/components/alert-dialog';
	import { buttonVariants } from '$lib/components/ui/button';
</script>

<AlertDialog.Root>
	<AlertDialog.Trigger class={buttonVariants({ variant: 'outline' })}
		>Show Dialog</AlertDialog.Trigger
	>
	<AlertDialog.Content>
		<AlertDialog.Header>
			<AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
			<AlertDialog.Description>
				This action cannot be undone. This will permanently delete your account and remove your data
				from our servers.
			</AlertDialog.Description>
		</AlertDialog.Header>
		<AlertDialog.Footer>
			<AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
			<AlertDialog.Action>Continue</AlertDialog.Action>
		</AlertDialog.Footer>
	</AlertDialog.Content>
</AlertDialog.Root>
```