Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Blocks / Feedback & states

Confirm dialogs

A project settings page that matches each action to its surface: a Dialog to rename, a bottom Drawer to share, and Alert Dialogs to archive or to delete after typing the name.

bunx --bun @getweini/cli@latest add alert alert-dialog avatar badge button card copy-button dialog drawer input label
Customize
  • Choose the surface by the cost of the action. `Dialog` is for reversible edits, `Drawer` is for quick touch actions, and `AlertDialog` interrupts only for destructive or hard-to-reverse work.
  • The block emits `rename`, `share` with the option id, `archive`, and `delete`. Set `loading` while your delete request runs, and pass `error` to show the failure inside the delete dialog.
  • Delete stays disabled until the typed text matches `name`, and the dialog lists what will be removed. Alert dialogs focus Cancel first and ignore backdrop clicks, so a stray click cannot confirm.
  • Pass `open` with `rename`, `share`, `archive`, or `delete` to show one surface on first render, for example from a deep link. Triggers and actions use `as-child` with a normal `Button`, and every string is in `copy`.