ClickorKeyboard shortcut Alt + L

Dragto resize

Nord Design System SearchDeveloperDeveloperGetting startedUsing Web ComponentsWebfontsCDNLocalizationCSS Framework Legacy ESLint PluginWorking with AIFAQDesignDesignGetting startedFoundationsThemesBrand assetsToolsComponentsComponentsAccordion New Aside New Autocomplete New AvatarBadgeBanner Updated ButtonButton GroupCalendar Updated CardCheckbox Updated Collapsible New Combobox New Command MenuDate Picker Updated Date Range Picker New DividerDrawerDropdownEmpty StateField New FieldsetFilter Bar New FooterHeaderIconInput Updated Item New Kbd New LayoutMessageMeter New ModalNavigationNotificationNumber Field New Otp Field New Outline New Pagination New Popout Updated ProgressProgress BarQrcodeRadio Updated Range Updated Scroll Area New Segmented ControlSelect Updated SkeletonSpinnerStackTabTableTagTextarea Updated Time Picker New ToastToggle Updated TooltipTop BarTruncate New Visually HiddenDesign TokensDesign TokensTailwind CSSTailwind CSSBlocksBlocksTemplatesTemplatesIconsIconsPlaygroundPlaygroundLatest UpdatesLatest UpdatesChangelogChangelogMigration guidesMigration guides
GitHub

Clickto expandKeyboard shortcut Alt + L

ProgressBar

Open in Storybook

Visually represent the completion of a task or process along a horizontal bar.

Loading...

Usage

Progress Bar visually represents the completion of a task or process along a horizontal bar, showing how much has been done and how much is left. Set value for a determinate bar, or omit it for an indeterminate, ongoing activity.

import "@nordhealth/components/lib/ProgressBar"

Examples

Determinate

Set value to show how much of the task is complete. With no max, the value is a percentage from 0 to 100.

Indeterminate

Omit value to show an indeterminate bar, indicating ongoing activity with no estimate of how long it will take.

Custom max

Use max to express progress against a value other than 100.

Styling

Customise the bar with CSS custom properties such as --n-progress-border-radius.

Interactive

The progress bar fills reactively as its value changes over time.

RTL

Progress Bar follows the document or container direction. Toggle the direction to see the layout mirror.

Accessibility

  • Give the bar a label describing what's progressing. It's visually hidden but exposed to assistive technology, and defaults to "Current progress".
  • An indeterminate bar (no value) communicates that activity is ongoing without an estimate; use value whenever you can report real progress.
  • The bar is built on a native <progress> element, so its state is exposed to assistive technology automatically.

API reference

ProgressBar

Progress Bar is used to visually represent the completion of a task or process. It shows how much of the task has been completed and how much is still left.

<nord-accordion></nord-accordion>

Props

PropertyAttribute Description TypeDefault
valuevalueSpecifies how much of the task has been completed. Must be a valid floating point number between 0 and max, or between 0 and 100 if max is omitted. If there is no value, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it’s expected to take.number | undefined
maxmaxDescribes how much work the task indicated by the progress element requires. The max attribute, if present, must have a value greater than 0 and be a valid floating point number.number100
labellabelAccessible label for the progress indicator. Visually hidden, but shown for assistive technology.string'Current progress'

Methods

Method nameParameters Description
focus(options?: FocusOptions) => voidoptions: An object which controls aspects of the focusing process.Programmatically move focus to the component.
blur() => voidN/AProgrammatically remove focus from the component.
click() => voidN/AProgrammatically simulates a click on the component.

CSS Properties

CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.

PropertyDescriptionDefault
--n-progress-sizeControls the thickness of the progress bar, using our spacing tokens.var(--n-space-s)
--n-progress-border-radiusControls how rounded the corners are, using border radius tokens.var(--n-border-radius-s)
--n-progress-colorControls the color of the progress bar, using color tokens.var(--n-color-accent)
Design guidelinesFor designers

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Use to show the completion status of an ongoing task.
  • Use progress bar when you can determine the percentage of the completed task at any time.
  • Always provide an accessible label when using Progress Bar.

Don’t

  • Don’t use in constrained spaces indicating indeterminate loading state, see Spinner instead.