Playground GitHub npm

Alert Dialog Panel

Headless destructive-confirm card (Cancel + Action) for your own overlay root.

ui overlay

Preview

Installation

npx slintcn@latest add alert-dialog-panel

Usage

import { AlertDialogPanel } from "slintcn/components/alert-dialog-panel.slint";

AlertDialogPanel {
    title: "Delete this account?";
    description: "This action cannot be undone.";
    confirmed => { /* … */ }
    cancelled => { /* … */ }
}

Properties

title in string

Heading at the top of the panel.

description in string

Body text describing the consequences of the action.

action-label in string

Label for the destructive button (right side).

cancel-label in string

Label for the safe button (left side).

action-variant in ButtonVariant

Style for the action button — defaults to `destructive`.

trap-focus in bool

Tab-cycle focus within the two buttons; set false to disable the trap.

confirmed callback ()

Fired on the destructive action.

cancelled callback ()

Fired on Cancel.

trap-index in-out int

Focus trap state: 0 = Cancel (default), 1 = Action.

API

Accessibility
focusableyes
keyboardTabEscape
focus trapyes
Escapedismisses

Dependencies

buttonseparator

Installed automatically as transitive dependencies of slintcn add alert-dialog-panel.