Progress
How far a task has come.
Left out of Content first Forms are rare and short, so there are no steps to count. Skeleton already holds article text while it loads. Use instead: Skeleton
See it live
npm run storybookWhen to use it
- Use it when: A known amount of work: an upload, steps of a form.
- Not when: A wait of unknown length (spinner), or a layout placeholder (skeleton).
Instead:
Words
- Write to one person: "you", not "users".
- Short sentences with room to breathe.
- Explain why before asking for anything.
- Use: Read, Save for later, You, Next issue. Avoid: Click here, Submit, Users, Content.
The labels components use, from the voice tokens:
content.action.commit: Savecontent.action.cancel: Not nowcontent.action.destroy: Removecontent.action.retry: Try againcontent.action.empty-action: Browse guides
See Voice and tone for the whole voice.
Accessibility and keyboard
Test before you ship:
- It reports its value and has a name. undefined
Use it in code
npx open-ds add progress
The component reads only component keys and semantic tokens, so it follows the brand and mode on <html>.
Tokens it reads
Progress reads 3 tokens of its own, each an alias of a semantic token. Each row is one part: its own token, the semantic it aliases, and the value it ends at. Change a semantic and every component that reads it follows; override one of Progress's tokens to change Progress alone.
Content first decides what changes when you switch theme. Here a switch changes colors only, so the marked rows differ between light and dark; everything else holds steady.
| Part | Its token and the semantic it aliases | Value |
|---|---|---|
| Progress | ||
| Corner | component.progress.radiusradius.roundvar(--progress-radius) | radius.full:9999px |
| Fill Changes with theme | component.progress.backgroundcolor.action.primaryvar(--progress-background) | Lightnavy.light.600:#1E3A5FDarknavy.dark.600:#8FA6C4 |
| Indicator | ||
| Fill Changes with theme | component.progress.indicator.backgroundcolor.action.primaryvar(--progress-indicator-background) | Lightnavy.light.600:#1E3A5FDarknavy.dark.600:#8FA6C4 |