Skip to content

BbConfirm

The confirm() dialog.

import { BbConfirm } from 'bitboss-ui';

On this page

Props

NameDescription
pt Type: (PtCompoundOf<"", { readonly parts: readonly ["root", "sheet", "header", "title", "content", "text", "footer", "close", "action", "ok", "cancel"]; readonly states: readonly ["open", "fullscreen"]; readonly wide: readonly ["open", "fullscreen"]; readonly except: { readonly action: readonly ["open"]; readonly ok: readonly ["open"]; readonly cancel: readonly ["open"]; }; readonly variant: { readonly names: readonly ["default", "destructive"]; readonly option: "confirmVariants"; }; }> & PtMap<BbConfirmPtPart, "default" | "open" | "destructive" | "fullscreen">)

Passthrough, object form: the same keys as the pt:* attributes without the prefix. See the pt:<part> row.

pt:<part> Type: PtValue

Passthrough, attribute form: one attribute per part, pt:<part>, and per part and state, pt:<part>:<state>. Parts: action, cancel, close, content, footer, header, ok, root, sheet, text, title. States: default, destructive, fullscreen, open.

Not attributes on a tag: there is no <BbConfirm /> to write them on. These parts are the keys of components.BbConfirm.pt in the plugin config, which styles every confirm the app opens.

See example

Renamed and removed

Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.

  • optionactions[].iconactions[].iconOnlyfails silently

    An icon-only button writes its label and icon: { text: 'Close', 'prepend:icon': 'lucide:x', iconOnly: true } (also ok / cancel); the label is the accessible name.

  • optiondismissAsNodismissAsCancelfails silently

    A confirm() option: backdrop, Escape and the ✕ run cancel.onClick unless dismissAsCancel: false.

  • optionnocancelfails silently

    A confirm() option: confirm({ cancel: false }); same values, plus true for the default label.

  • optionyesokfails silently

    A confirm() option: confirm({ ok: 'Delete' }); same values, plus true for the default label.