Alert Dialog
Overlays bits-uiA glass modal that interrupts for a confirmation.
Example
<script lang="ts">
import * as AlertDialog from '$lib/components/ui/alert-dialog';
import { buttonVariants } from '$lib/components/ui/button';
</script>
<AlertDialog.Root>
<AlertDialog.Trigger class={buttonVariants({ variant: 'destructive' })}>
Drain reservoir
</AlertDialog.Trigger>
<AlertDialog.Content>
<AlertDialog.Header>
<AlertDialog.Title>Drain the reservoir?</AlertDialog.Title>
<AlertDialog.Description>
This empties every drop and cannot be undone. The basin will run dry.
</AlertDialog.Description>
</AlertDialog.Header>
<AlertDialog.Footer>
<AlertDialog.Cancel>Keep it</AlertDialog.Cancel>
<AlertDialog.Action>Drain</AlertDialog.Action>
</AlertDialog.Footer>
</AlertDialog.Content>
</AlertDialog.Root>Installation
npx shadcn-svelte@latest add https://mizu-ui.com/r/alert-dialog.json