SuperdindaDocs
Overlays

ConfirmDialog

A yes/no decision that says what happens before it happens (Figma "Confirm Dialog" 2056:55813, Product × Tone).

An alert dialog: Escape and Cancel close it, an outside click does not; focus is trapped and returns to the trigger. Use Tone=Destructive for anything that removes or stops.

<ConfirmDialog tone="destructive" trigger={<Button variant="destructive" size="44">Excluir conta</Button>}
   title="Excluir a sua conta?" consequencesTitle="O que acontece:" consequences={["A proteção da Marlene para hoje."]}
   acknowledgeLabel="Entendi que isso não dá pra desfazer." confirmLabel="Excluir conta" cancelLabel="Cancelar"
   closeLabel="Fechar" onConfirm={deleteAccount} />

Playground

Um preset por valor do primeiro eixo do Figma. Mude as props; dsState força hover, foco ou pressionado, como na matriz.

Confirm Dialog

Variantes, tamanhos e estados

Cada célula é o componente real, marcada com a variante do Figma que reproduz (passe o mouse pra ver o node).

Product · App

ToneConfirm Dialog
Default

Conectar só a Lia agora?

A Marlene ainda não aceitou. Dá pra conectar a Marlene depois.

O que acontece:

  • A Lia começa protegida hoje.
  • O convite da Marlene continua valendo por 7 dias.
Destructive

Excluir a sua conta?

Tudo o que a Superdinda guarda sobre a sua família é apagado.

O que acontece:

  • A proteção da Marlene e da Lia para hoje.
  • Os avisos e o histórico somem em 30 dias.
  • O plano é cancelado no fim do período.

Product · Backoffice

ToneConfirm Dialog
Default

Comprar 2 IPs para o pool BR?

A cobrança entra na fatura de novembro do fornecedor.

O que acontece:

  • Os IPs entram no pool em até 10 minutos.
  • Cada IP atende até 5 sessões.

Fica registrado na auditoria com seu nome.

Destructive

Derrubar as sessões da Mariana?

Ela precisa entrar de novo em todos os aparelhos.

O que acontece:

  • As 3 sessões abertas terminam agora.
  • A proteção da família continua normalmente.

Fica registrado na auditoria com seu nome.

Props

As props que o arquivo do DS declara. O componente também repassa as do primitivo (base-ui), quando ele tem um.

ConfirmBaseProps

PropTipoPadrãoDescrição
boolean—Controlled open state; pair with onOpenChange.
boolean—Uncontrolled initial state.
((open: boolean) => void)—
ReactElement<unknown, string | React.JSXElementConstructor<any>>—The element that opens it (a DS Button), wired as the dialog trigger.
OverlayProduct—App (stacked 44 px buttons, radius 22) or Backoffice (inline dense).
OverlayTone—Destructive turns the icon chip, the consequences and the confirm red.
ReactNode—
ReactNode—
ReactNode—A lucide glyph for the header chip (triangle-alert, shield-alert…).
ReactNode—Title of the consequence list, e.g. "O que acontece:".
ReactNode[]—The lines of the consequence list.
ReactNode—Label of the main action, a verb that names it ("Desativar conta").
ReactNode—
string—Accessible name of the X button (pt-BR, e.g. "Fechar").
ReactNode—The Dialog Footer "helper", e.g. "Fica registrado na auditoria com seu nome."
boolean—Busy from outside (the confirm shows its spinner and ignores presses).
boolean—Render in place, open and not modal: for /__ds and the docs only.
string—Classes for the panel (e.g. a width in the docs).

ConfirmDialogProps

PropTipoPadrãoDescrição
boolean—Controlled open state; pair with onOpenChange.
boolean—Uncontrolled initial state.
((open: boolean) => void)—
ReactElement<unknown, string | React.JSXElementConstructor<any>>—The element that opens it (a DS Button), wired as the dialog trigger.
OverlayProduct"app"App (stacked 44 px buttons, radius 22) or Backoffice (inline dense).
OverlayTone"default"Destructive turns the icon chip, the consequences and the confirm red.
ReactNode—
ReactNode—
ReactNode—A lucide glyph for the header chip (triangle-alert, shield-alert…).
ReactNode—Title of the consequence list, e.g. "O que acontece:".
ReactNode[]—The lines of the consequence list.
ReactNode—The Figma "showAcknowledge" checkbox, e.g. "Entendi que isso não dá pra desfazer.": the confirm stays disabled until it is checked.
ReactNode—Label of the main action, a verb that names it ("Desativar conta").
ReactNode—
string—Accessible name of the X button (pt-BR, e.g. "Fechar").
ReactNode—The Dialog Footer "helper", e.g. "Fica registrado na auditoria com seu nome."
boolean—Busy from outside (the confirm shows its spinner and ignores presses).
boolean—Render in place, open and not modal: for /__ds and the docs only.
string—Classes for the panel (e.g. a width in the docs).
(() => unknown)—Runs on confirm. Return a promise to show the spinner; the dialog closes when it resolves and stays open if it rejects.

On this page