ui-kit-htx previewGitHub
← modals

confirm_modal

5 stories — source: confirm_modal.greg.py

default

Confirm action

Are you sure you want to proceed?

Default body uses the `message` prop. Open by default for preview.

danger

Delete backup

prod_2026-04-25.bak will be removed from disk.

Danger-styled confirm button — for destructive actions.

custom-body-slot

Delete backup

The file will be removed from disk and all linked snapshots will be unstaged.

This cannot be undone.

Q5 slot body — children passed via brackets replace the default `message` rendering. Two paragraphs, one styled as a warning.

with-htmx-attrs

Delete backup

This will remove the backup permanently.

Confirm button carries htmx attrs — server returns OOB swaps to remove the row + emit a toast + close the dialog. Will be replaced by Invocation typed helper (Issue #11) but the underlying contract — htmx attrs on confirm — stays the same.

closed-by-default

Reload data

This will discard unsaved edits.

Default `open=False`. The modal is rendered but hidden — caller opens it via `dialog.showModal()` or by sending an OOB swap that replaces this with an `<dialog open>` variant.