ProgressBar
When to use it
Section titled “When to use it”- To show how full something is against a known total, such as a property’s occupancy for a night (“38 of 48 · 79%”).
- To compare parts of a whole side by side, such as revenue by booking channel, with each share as the Value.
- To show a score out of a maximum, such as review scores by category; hide the label row when the layout already names it.
- Use tone inverse on navy backgrounds, such as a sold-out night in the calendar.
Not built. The last “when to use” item (Figma node 140:204) is copied from Figma as written, and it recommends something this build does not have. ProgressBarTone has only primary, success, neutral. From decisions.md, “2026-10-02 · ProgressBar inverse tone not built”: Gate 5 passes for the missing inverse tone, and for that tone only, until the designer gives the inverse track a colour distinct from its fill and the tone is built. The user decided to build only the three working tones (primary, success, neutral). No story is drawn for the inverse tone, and the tone union does not include it.
When not to use it
Section titled “When not to use it”- For steps in a flow, such as “1 of 3”: use the Stepper component instead.
Instead: Stepper - To compare exact figures across many rows: use the Table component instead.
Instead: Table
Best practice
Section titled “Best practice”From the Figma documentation page (usage node 140:82), as written. These items aren’t carried into ProgressBar.intent.json, which has no field for them.
- Always show the number too, as the Value or a nearby label; the bar alone isn’t precise and screen readers can’t read it.
- Pick the value (0 to 100 in steps of 10) and type the same number in Value, so the bar and the text agree.
- Keep bars in the same group the same size and width so they can be compared.
- Give colours a consistent meaning, such as one colour per booking channel, and name it in the label.
- Use size sm in dense layouts such as calendar cells, and md everywhere else.
- Keep the fill between 0 and 100%; show overbooking with a separate marker, not a bar longer than its track.
Where the built component differs. Item 2 (Figma node 140:232) says to type the same number in Value. ProgressBar.tsx has no separate Value text to type: it prints the text from value itself. The Code tab says how.
What each variant is for
Section titled “What each variant is for”| Property | Value | What it is for |
|---|---|---|
size |
md |
8px (default) |
size |
sm |
6px (dense layouts such as calendar cells) |
tone |
primary |
default |
tone |
success |
Figma doesn’t say. |
tone |
neutral |
Figma doesn’t say. |
Accessibility
Section titled “Accessibility”- The component renders a native <progress> with max=100, so the progressbar role and value announcement are the browser’s own.
src/components/ProgressBar/ProgressBar.tsx:59 - The visible label is linked to the <progress> with aria-labelledby, using an id generated by React’s useId.
src/components/ProgressBar/ProgressBar.tsx:63 - When showLabel is false the label text is applied as aria-label so the progress bar keeps an accessible name.
src/components/ProgressBar/ProgressBar.tsx:64 - The helper text is linked with aria-describedby when it is shown.
src/components/ProgressBar/ProgressBar.tsx:65 - value is clamped to 0..100 (non-finite becomes 0) before it reaches the element and the value text.
src/components/ProgressBar/ProgressBar.tsx:20
What this version promises
Section titled “What this version promises”From Versioning (VERSIONING.md at b9ffb76):
0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.
Two things about this release are worth knowing:
- Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
- Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.
Stories
Section titled “Stories”All Variants
Section titled “All Variants”The single-variant stories (MdPrimary, SmPrimary, MdSuccess, SmSuccess, MdNeutral, SmNeutral) are cells of the variant matrix; the Design tab links each one.
Import
Section titled “Import”import { ProgressBar } from "@layerbasesystemic/horizon-design-system";import type { ProgressBarProps, ProgressBarSize, ProgressBarTone } from "@layerbasesystemic/horizon-design-system";@layerbasesystemic/horizon-design-system/tokens.css and @layerbasesystemic/horizon-design-system/styles.css must be loaded too; see Developing.
| Prop | Type | Default | Description |
|---|---|---|---|
size |
ProgressBarSize |
"md" |
— |
tone |
ProgressBarTone |
"primary" |
— |
value |
number |
60 |
0 to 100, clamped. Sets the fill and the visible value text (${value}%). |
label |
string |
"Label" |
— |
helper |
string |
"Helper text" |
— |
showLabel |
boolean |
true |
— |
showHelper |
boolean |
true |
— |
ProgressBarProps also extends Omit<HTMLAttributes<HTMLDivElement>, "children">, so native attributes pass through to the element (ProgressBar.tsx:8).
value against Figma’s Value text. In Figma the percentage is a separate text property: the component description says “then type the matching Value text” (node 140:66), and Best Practice (node 140:232) says “Pick the value (0 to 100 in steps of 10) and type the same number in Value, so the bar and the text agree.” The built component works differently: value is a number, ProgressBar.tsx clamps it to 0..100 (ProgressBar.tsx:20), uses it for the fill, and prints ${value}% itself (ProgressBar.tsx:56). There is no separate Value text to type, so the bar and the text can’t disagree. It also takes any number, not only steps of 10; Figma’s steps of 10 come from the nested bar, and the Storybook control steps by 10.
Union types
Section titled “Union types”ProgressBarSize: md, sm
ProgressBarTone: primary, success, neutral
Tokens it needs
Section titled “Tokens it needs”Every CSS custom property ProgressBar.css reads, with its value in the token build at b9ffb76.
| Token | Light | Dark |
|---|---|---|
--color-bg-surface |
#f2f3f5 |
#272a37 |
--color-primary-default |
#2b5ad6 |
#6692f8 |
--color-status-success |
#229c4a |
#4dba6d |
--color-text-primary |
#161925 |
#f9fafb |
--color-text-secondary |
#4d5361 |
#9ca2b1 |
--fontfamily-body |
Inter |
same as light |
--fontsize-lg |
13px |
same as light |
--fontsize-sm |
11px |
same as light |
--lineheight-lg |
20px |
same as light |
--lineheight-sm |
16px |
same as light |
--radius-full |
999px |
same as light |
--spacing-xs |
4px |
same as light |
This matches required_tokens in ProgressBar.intent.json exactly.
Figma node
Section titled “Figma node”Page Progressbar (57:1637), documentation frame ❖ progressbar (140:67), component set progressbar (140:66). The file is shared with the team only, so the frame and the link ask anyone outside it to sign in.
The page also holds _progressbar-bar (142:207), which Figma describes as: “Internal part of progressbar (not for direct use). value sets the fill length in steps of 10; the fill scales with the bar’s width.”
Variant matrix
Section titled “Variant matrix”size (2) × tone (4) = 8 cells. The component set (140:66) publishes all 8 variants, named size=md, tone=primary (140:5) through size=sm, tone=inverse (140:59). Label, Value, Helper, ShowLabel and ShowHelper are component properties, not matrix axes. The two tone=inverse cells (140:52, 140:59) are published in Figma but not built: see the design gap “ProgressBar inverse tone not built” below. Figma draws no states.
size |
tone=primary |
tone=success |
tone=neutral |
tone=inverse |
|---|---|---|---|---|
md |
MdPrimary140:5 |
MdSuccess140:24 |
MdNeutral140:38 |
no story140:52 |
sm |
SmPrimary140:17 |
SmSuccess140:31 |
SmNeutral140:45 |
no story140:59 |
Each cell is the Storybook story for that combination and its Figma variant node. ProgressBarSize and ProgressBarTone are the union types listed on the Code tab. 2 of the 8 cells have no story in the deployed Storybook (marked no story above): size=md, tone=inverse (140:52), size=sm, tone=inverse (140:59). Figma publishes them; the build does not. The story that isn’t a single cell (AllVariants) is embedded on the Examples tab.
Themes
Section titled “Themes”The progressbar component set renders every cell once, in one theme. It has no separate light and dark frames.
The token build defines 179 tokens for light and redeclares 50 for dark; the Code tab shows ProgressBar’s tokens in both.
Values Figma never bound
Section titled “Values Figma never bound”Values on the Figma node that aren’t bound to a variable, and what ProgressBar.css at b9ffb76 does with each.
| Layer | Property | Figma value | In the code |
|---|---|---|---|
| track, size=md (140:5, 140:24, 140:38, and the unbuilt 140:52) | height | 8px |
height: 8px; |
| track, size=sm (140:17, 140:31, 140:45, and the unbuilt 140:59) | height | 6px |
height: 6px; |
Figma variables against the token build
Section titled “Figma variables against the token build”| Figma variable | Figma value | Token in the build | Built light value | Agrees |
|---|---|---|---|---|
--color-text-primary |
#161925 |
--color-text-primary |
#161925 |
yes |
--fontSize-lg |
13 |
--fontsize-lg |
13px |
yes |
--fontWeight-regular |
Regular |
no such token | — | no token |
--fontFamily-body |
Inter |
--fontfamily-body |
Inter |
yes |
--lineHeight-lg |
20 |
--lineheight-lg |
20px |
yes |
--fontWeight-semibold |
Semi Bold |
no such token | — | no token |
--radius-full |
999 |
--radius-full |
999px |
yes |
--color-primary-default |
#3b71f2 |
--color-primary-default |
#2b5ad6 |
no |
--color-bg-surface |
#f2f3f5 |
--color-bg-surface |
#f2f3f5 |
yes |
--color-text-secondary |
#4d5361 |
--color-text-secondary |
#4d5361 |
yes |
--fontSize-sm |
11 |
--fontsize-sm |
11px |
yes |
--lineHeight-sm |
16 |
--lineheight-sm |
16px |
yes |
--spacing-xs |
4 |
--spacing-xs |
4px |
yes |
--color-status-success |
#229c4a |
--color-status-success |
#229c4a |
yes |
--color-text-inverse |
#f9fafb |
--color-text-inverse |
#f9fafb |
yes |
--color-text-inverse-secondary |
#d1d5db |
--color-text-inverse-secondary |
#d1d5db |
yes |
--fontWeight-regular, --fontWeight-semibold are bound in Figma but the token build has no token of that name.
1 colour variable in Figma still holds a different value from the token build, so the design file and the shipped component render --color-primary-default differently.
Design gaps recorded against it
Section titled “Design gaps recorded against it”- 2026-10-02 · ProgressBar track heights with no token (decisions.md). These literals in src/components/ProgressBar/ProgressBar.css are accepted, because they are what the Figma node specifies, until the designer adds matching size tokens. Accepted values:
8px(height (md track),.hz-progressbar__track, line 50);6px(height (sm track),.hz-progressbar--sm .hz-progressbar__track, line 60). Not ruled: Any other literal value, including a var() fallback. These values in any other component. A change to these values: a different number needs a new ruling or a token. The primary fill, which uses –color-primary-default (#2b5ad6) and differs from the #3b71f2 Figma shows: that is the user’s choice to use the bound token, not a gate finding. The font-weight values 400 and 600, which are unitless numbers and need no ruling. The inverse tone, which is not built because Figma draws its track and fill the same colour: that needs the designer. Any state Figma does not draw. - 2026-10-02 · ProgressBar inverse tone not built (decisions.md). Gate 5 passes for the missing inverse tone, and for that tone only, until the designer gives the inverse track a colour distinct from its fill and the tone is built. The user decided to build only the three working tones (primary, success, neutral). No story is drawn for the inverse tone, and the tone union does not include it. Not ruled: Any other published Figma variant or state that is not built. Any change to the six built cells. The two literals ruled in “ProgressBar track heights with no token”. Whether Figma’s Usage line about the inverse tone should be removed or reworded: that is for the designer.
Every commit to src/components/ProgressBar up to b9ffb76, newest first, with the published version that carries it.
| Commit | Date | Version | Change |
|---|---|---|---|
cd88d1c |
2026-10-02 | 0.2.0 | ProgressBar: intent usage from Figma 140:82 |
e01625a |
2026-10-02 | 0.2.0 | ProgressBar: build from Figma 140:66 (md/sm x primary/success/neutral) |