Skip to content
Devix Open Source

Playground

Turn the options and watch it change. The code below changes with it, in whichever framework you are using — copy it and you have what is on the screen.

Live
import { dialog } from '@devix-labs/confirm-dialog';
import '@devix-labs/confirm-dialog/styles.css';

const answer = await dialog({
  title: 'Delete invoice INV-2043?',
  description: 'It has already been sent to the client. This cannot be undone.',
  tone: 'danger',
  confirmText: 'Delete it',
  cancel: true,
  dismissible: false,
  defaultAction: 'cancel',
  requireText: ''
});
if (answer?.confirmed) remove();

Every option here is in the documentation, along with the ones that are not worth a control.