Skip to content

Progress ​

catnip-progress shows determinate completion from 0% to 100%. Use it for a measurable upload or processing operation, or to summarize progress through a multi-step flow.

The component owns the progress semantics, normalization, track, fill, label row, percentage, size, and intent treatment. The consumer owns the operation state and the words that explain it.

Size M uses text-m, a 20px intent icon, and a 4px track. Size L uses text-l, a 24px intent icon, and an 8px track.

Live example ​

Main use cases ​

Operation or flow progress ​

Use the complete component when the progress indicator needs its own visible description:

html
<catnip-progress progress="50" label="Uploading document..." progress-aria-label="Document upload progress"></catnip-progress>

For a form or flow, keep the numeric value proportional to the whole flow and use progressAriaValueText when a step description is more useful than a percentage:

html
<catnip-progress progress="50" label="Account setup" progress-aria-value-text="Step 2 of 4 complete"></catnip-progress>

File Item composition ​

catnip-file-item composes catnip-progress internally for its bottom upload bar. File Item continues to own the file name, visible percentage, upload status, and actions; Progress owns the reusable bar and accessible progress semantics. File Item sets showZeroIndicator to false so a 0% upload shows an empty track rather than the standalone zero marker.

For a standalone bar-only presentation, set hideLabel. The label still provides the accessible name even though its visual row is hidden:

html
<catnip-progress progress="25" hide-label label="Passport upload progress"></catnip-progress>

Guidelines ​

Use Progress for measurable completion ​

  • Use Progress when the application knows a meaningful value between 0 and 100.
  • Use catnip-spinner when duration or completion cannot be measured.
  • Keep the label specific: Uploading passport.pdf, Validating records, or Step 2 of 4 is more useful than the bundled progress.label fallback (Loading data...). Override label per operation; app-wide language goes through registerTranslate.
  • catnip-progress is read-only. The consumer owns upload requests, cancellation, retries, polling, and state transitions.
  • Use size M for the standard text-m, 20px-icon, 4px-track presentation. Use L when the surrounding hierarchy calls for text-l, a 24px icon, and an 8px track.

Upload lifecycle ​

For a single file upload, use intent="default" while bytes are being transferred. Browser upload progress events or acknowledged multipart chunks normally provide the numeric value.

A robust upload flow distinguishes transport from final server work:

  1. Uploading, 0–100%: bytes are being transferred.
  2. Finalizing or processing: the server may still validate a checksum, scan, parse, or store the file. Use a separate determinate value only if that work can be measured; otherwise use Spinner.
  3. Success or danger: show the final outcome after server confirmation.

For one file, success below 100% is usually misleading. It is valid when the percentage represents a larger workflow or file batch rather than that file's byte transfer. danger at 100% is valid because the server can reject the file after all bytes arrive.

Use warning only for a defined non-blocking or recoverable condition. Keep the explanatory text visible; changing the bar to orange is not sufficient by itself.

Flow and form progress ​

  • Base the percentage on the whole flow, not the current step's internal completion.
  • Do not use Progress as interactive step navigation. A stepper needs separate current-step, completed-step, navigation, and validation semantics.
  • Semantic intent and numeric progress are independent. A warning can occur at 50%, and a failure can occur at 100%, but the label must explain what happened.

Composition with File Item ​

Use catnip-file-item when the progress belongs to one uploaded file. File Item already composes the bar-only Progress presentation, supplies an accessible upload name, keeps the visible percentage with the file metadata, and turns off showZeroIndicator so 0% is an empty track.

Do not add another standalone Progress next to the same File Item; that would duplicate both the visual state and assistive-technology output.

Catnip Design System by Signicat