Status Mark
The toast's loading-then-done, for any control: a resting icon turns into the spinner, and the spinner turns into a tick or a cross that draws itself in. Every 'work, then result' moment uses it, so the motion is the same everywhere.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { StatusMark } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Props
state
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use it wherever a control does work and then shows the result, like copying a matter number or uploading a document, so every such moment moves the same way. |
| Do | Pass the control's resting icon as children, so the mark sits in the icon's place before and after the work. |
| Do | Say what happened in the control's text or a live region, like "Copied" or "Upload failed". The mark is decorative, and the tick and cross differ in shape, not only colour. |
| Do | Set the colour on the parent, like the success text colour for done. The mark draws in the current text colour. |
| Don't | Build this into a Button yourself. Pass showResult and return a Promise from onClick; the button runs the same spinner, tick and cross. |
| Don't | Add your own delay before switching from busy to done. Busy already plays at least one full pass, so a quick job never flashes. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| state * | "idle" | "busy" | "done" | "error" | — | idle shows the icon you pass; busy the spinner; done a tick and error a cross, each drawing itself in. |
| children | ReactNode | — | The resting glyph, like a copy or upload icon. Leave it out to show nothing while idle. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Code
What the playground shows, ready to copy.
import { StatusMark } from "@leap-crm/design-system";
<StatusMark state="busy" />






