Toast
Sonner, configured to our tokens.
npx shadcn add @lopifi/toastExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Confirmation
A routine success says what happened and when, then leaves; the record itself is the lasting proof.
With an undo
A reversible, unposted change can offer its undo in the toast, because nothing has reached the ledger yet.
Background job
A promise toast follows an export through to done or failed, without holding the reader on the page.
Non-critical error
A background sync failure can be a toast because it retries on its own; a failed payment never is, and persists inline.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
Sonner, configured to our tokens. 400ms ease enter, 200ms exit, transitions not keyframes, stack offsets −0.05 scale / −16px / −0.2 opacity, swipe-dismiss at 45px or velocity > 0.11. Auto-dismiss pauses on tab hide.
Never the only channel for a critical error. Toasts are timed and dismissible; a failed payment persists inline.
More in System & states
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section Toast renders in, the calculators behind its figures, and the ledger payloads that feed it.
- Toast, runningThe system showcase — live, with theme, density, grayscale and reduced-motion switches.
- Writes, concurrency and rate limitsWhat happens when you write, and how fast can you go?
- System & statesEmpty, error, loading, stale and confirm states. They decide whether a product feels finished. Specs for 9 React components: EmptyState, ErrorState, Skeleton, StaleIndicator and 5 more.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when System & states changes
Your copy doesn’t update itself when we fix something here.
- One email when a System & states component needs a migration
- Nothing when nothing changes
Or install it now