← All examplesFlows

Multiple actions

Give save and publish separate inputs, pending labels, confirmations, and outcomes.

Live example Interactive
flow.statusidleflow.pendingAction—
CodeFocused snippet
const flow = useSubmitFlow({
  save: { run: saveDraft, pendingLabel: 'Saving…' },
  publish: {
    run: publishDraft,
    confirm: { title: 'Publish this draft?' },
    pendingLabel: 'Publishing…',
  },
})

Read the related guide →

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