Search the documentation

Type to search page titles, component names and descriptions.

    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.

    1. Qualified, completed
    2. Consulting, completed
    3. Proposal
    4. Negotiation
    5. Close
    1. Qualified, completed
    2. Proposal, completed
    3. Negotiation
    4. 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.

    PropertyDescriptionTypeDefault
    labelrequired–string–
    completeLabelrequiredRead after a passed step's name, for example "completed".string–
    stepsrequired–readonly StagePathStep[]–

    #Types

    #StagePathStep

    PropertyDescriptionTypeDefault
    idrequired–string–
    labelrequired–string–
    staterequiredWhere the record stands against this step. One step is current.'complete' | 'current' | 'upcoming'–
    hrefMoves the record to this step. Omit it when the viewer may not, and for the current step.string | null–
    toneThe 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-path
    • stage-path-step
    • stage-path-label
    • stage-path-marker
    • stage-path-text