← All examplesConfirms

Destructive confirmation

Require explicit confirmation before running a destructive action.

Destructive confirmation

Decline the prompt or confirm the sample deletion.

CodeFocused snippet
const flow = useSubmitFlow({
  remove: {
    run: ({ id }) => deleteRecord(id),
    confirm: {
      title: 'Delete this record?',
      description: 'This cannot be undone.',
      destructive: true,
      confirmLabel: 'Delete',
    },
  },
})

Read the related guide →

This demo uses a local, temporary action. It does not send data or write to a service.