Alert Dialog

A focused confirmation surface for important decisions.

The Alert Dialog Component

Save before leaving?

Unsaved edits in this release brief will be lost if you close the editor now.

Delete workspace

This permanently removes teammates, drafts, and billing history from the workspace.

Basic Usage

Code Snippet

<script lang="ts">		import { AlertDialog, Button } from '$lib/components'; 		let open = $state(false);	</script> 	<Button role="danger" variant="soft" onclick={() => (open = true)}>Delete project</Button> 	<AlertDialog		bind:open={open}		type="destructive"		title="Delete project"		description="This action removes the workspace and cannot be undone."		confirmLabel="Delete"		cancelLabel="Keep project"	/>

Examples

Confirmation Prompt

Require an explicit prompt when the action is irreversible.

Archive account

Type ARCHIVE to confirm before the account is moved out of production.