Popconfirm component for Pure Admin.
Small confirmation dialogs anchored to trigger buttons. Perfect for delete confirmations and quick yes/no decisions. Uses Floating UI for positioning with automatic collision detection.
Summary
Functions
Renders a popconfirm with a trigger button and confirmation dialog.
Functions
Renders a popconfirm with a trigger button and confirmation dialog.
Examples
<.popconfirm
id="delete-item"
message="Are you sure you want to delete this item?"
confirm_event="delete"
confirm_value={%{id: @item.id}}
>
<.button variant="danger" size="xs">Delete</.button>
</.popconfirm>
<.popconfirm
id="archive"
message="Archive this item?"
icon_variant="warning"
confirm_text="Archive"
confirm_variant="warning"
confirm_event="archive"
>
<.button variant="warning">Archive</.button>
</.popconfirm>Attributes
id(:string) (required)message(:string) (required) - Confirmation message text.placement(:string) - Defaults to"bottom". Must be one of"top","bottom","start", or"end".icon_variant(:string) - Icon style for the message. Defaults tonil. Must be one ofnil,"danger","warning", or"info".is_compact(:boolean) - Compact variant for table actions. Defaults tofalse.confirm_text(:string) - Confirm button text (default: translated). Defaults tonil.cancel_text(:string) - Cancel button text (default: translated). Defaults tonil.confirm_variant(:string) - Confirm button color variant. Defaults to"danger". Must be one of"primary","secondary","success","warning","danger", or"info".confirm_event(:string) - LiveView event to push on confirm. Defaults tonil.confirm_value(:map) - Value to send with confirm event. Defaults to%{}.class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required) - Trigger content (usually a button).