Confirmation state
● Stable · v0.1"Done — it saved." Confirmation state closes the loop on a capture action. In real life DayTwo capture lacks confirmation, which leaves users unsure it worked — this is the unmistakable "it's recorded" moment.
In context
Purpose
Confirmation state tells the user, plainly and visibly, that their action succeeded — then points at the next step so they're never left wondering "did that work?" or stuck on a dead end.
Anatomy
- Success mark — a filled check-circle in the success green (the default), or your own icon. A clean, unmistakable "it worked".
- Title — what just happened, in plain words ("Sale recorded").
- Description (optional) — the specifics, echoing back what was saved.
- Actions (optional) — a primary next step, and an optional quiet way out.
Code
import { ConfirmationState } from '@daytwo/components'<ConfirmationStatetitle="Sale recorded"description="Ks 12,000 from Daw Hla is saved."actionLabel="Record another sale"onAction={startAnother}secondaryActionLabel="Back to home"onSecondaryAction={goHome}/>
When to use
- Right after a capture completes (a sale logged, a note saved) — the moment that's missing today.
- After any action where the user might otherwise doubt it worked.
When NOT to use
- For trivial, obviously-reversible actions — a full confirmation screen for toggling a setting is overkill; a quiet inline cue is enough.
- To replace an error state — only confirm real success; never show a checkmark when something failed.
The correct scenario
The owner finishes logging a cash sale. A clear screen confirms "Sale recorded — Ks 12,000 from Daw Hla is saved," and offers "Record another sale" as the obvious next step. The loop is closed, and capturing the next sale is one tap away.
Anti-patterns
Confirming the specifics ('Ks 12,000 from Daw Hla') is far more reassuring than a generic 'Success'. It proves the app captured the right thing.