Calm motion: animations on this site only fade, with no movement
Document status
The states of a document, such as draft, approved, sent, and paid, with the next step
Shows where an order, an invoice, or a contract is in its life in an ERP. For the people who approve a step, use the approval flow.
Basic
- Draft, done14 Nov, 10:02
- Approved, current state15 Nov, 16:40
- Sent, not yet
- Paid, not yet
- Draft, done14 Nov, 10:02
- Approved, current state15 Nov, 16:40
- Sent, not yet
- Paid, not yet
- Cancelled
statesis the list of states in order. Each state has anidand alabel.timeis optional: it says when the document reached the state.v-modelis the id of the current state. It is filled, and it hasaria-current. Done states have a tick, and states to come are dashed. Screen readers hear "done", "current state", or "not yet" after each name.- The button moves the document to the next state, such as "Mark as Sent", and emits
advancewith its id. After the last state, the button goes away. stoppedends the chain with a word, such as "Cancelled". The states to come are struck through, and there is no button.- Change the words with
labelsor a label pack:title,done,current,next, andmove(a function).
Usage
ts
import { BlessDocumentStatus } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
states* | BlessDocState[] | — | the states in order |
stopped | string | — | the document stopped, for example cancelled; the chain ends with this word |
labels | Partial<{ title: string; done: string; current: string; next: string; move: (state: string) => string; }> | — | |
modelValue | string | — | the id of the state the document is in |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string | undefined] | |
advance | [id: string] |