lantern

Overlays

Modal & alert dialog

Focus-trapped dialogs for forms and confirmations.

Alert dialog

A deliberately constrained confirmation surface for irreversible or high-impact choices. Unlike a general modal, it requires consequence copy plus cancel/action controls, focuses Cancel first, hides the generic close button, and ignores outside clicks.

Revoke a production credential

The consequence is concrete and the destructive action is visually singular. This demo never changes a real credential.

API reference

Props and slots, introspected from the component.

Prop Type Default Description
backdrop_class any nil Extra classes on the dimmed backdrop.
class any nil Extra classes on the dialog panel.
close_on_esc boolean true Close when Escape is pressed.
container_class any nil Extra classes on the overlay root.
id* string — Stable DOM id used by open_dialog/close_dialog.
open boolean false Render already open.
Slots
:action* Confirmation control for the destructive action.
:cancel* Safe cancellation control; receives initial focus.
:description* Explanation of the irreversible action.
:title* Concise statement of the consequence.