Navigation
StagePath
Where one record stands in its process.
import { StagePath } from 'faifo-design'StagePath shows the steps of a process for one record: passed steps carry a check, the current one
is filled, and a closed outcome takes its tone. On a narrow width the path folds to the current
step's name.
#When to use
- Use it at the top of a record whose workflow has named stages.
- It carries no numbers. To count the work sitting in each stage of a process, use
Pipeline. - For how far along one task is, use
Progress.
#Examples
Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.
#Stage path
Where one record stands in its process. Passed steps carry a check, the current one is filled, a closed outcome takes its tone; a narrow path folds to the current name.
- Qualified, completed
- Proposal, completed
- Negotiation
- Lost
Show codeHide code
import { Stack, StagePath } from 'faifo-design'
export const Example = () => (
<Stack
items={[
<StagePath
label="Sales path"
completeLabel="completed"
steps={[
{ id: 'qualified', label: 'Qualified', state: 'complete', href: '#stage-path' },
{ id: 'consulting', label: 'Consulting', state: 'complete', href: '#stage-path' },
{ id: 'proposal', label: 'Proposal', state: 'current' },
{ id: 'negotiation', label: 'Negotiation', state: 'upcoming', href: '#stage-path' },
{ id: 'close', label: 'Close', state: 'upcoming', href: '#stage-path' },
]}
/>,
<StagePath
label="Closed sales path"
completeLabel="completed"
steps={[
{ id: 'qualified', label: 'Qualified', state: 'complete' },
{ id: 'proposal', label: 'Proposal', state: 'complete' },
{ id: 'negotiation', label: 'Negotiation', state: 'upcoming' },
{ id: 'lost', label: 'Lost', state: 'current', tone: 'danger' },
]}
/>,
]}
/>
)#API
Generated from the package source. A property without a description has none in the source yet.
#StagePathComponent
Where one record stands in its process, like Salesforce's Path or an ERP's status bar. Not a Pipeline, which counts the work sitting in every stage of a process. A path carries no numbers: each step is passed, current or still ahead. The current step has aria-current="step"; a passed step says so in words as well as with a check, because colour alone does not. Each chevron is drawn behind its step by the stylesheet, so the shape never clips a focus ring. Names wrap rather than truncate. Once the path is narrower than 48rem, steps other than the current one fold to their marker (a check, or their number); their names stay in the accessible tree.
| Property | Description | Type | Default |
|---|---|---|---|
labelrequired | – | string | – |
completeLabelrequired | Read after a passed step's name, for example "completed". | string | – |
stepsrequired | – | readonly StagePathStep[] | – |
#Types
#StagePathStep
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
staterequired | Where the record stands against this step. One step is current. | 'complete' | 'current' | 'upcoming' | – |
href | Moves the record to this step. Omit it when the viewer may not, and for the current step. | string | null | – |
tone | The outcome a closing step records, which colours it once it is current. | 'positive' | 'danger' | null | – |
#Hooks
The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.
stage-pathstage-path-stepstage-path-labelstage-path-markerstage-path-text