Skip to main content

Progress

Bar plus a mono count for long operations.

<mm-progress label="Cataloguing assets" value="412" max="1280" unit="assets"></mm-progress>

Guidance​

Progress shows how far a long operation has got: a 4px bar on mm-sunken filled in mm-text-2, and a real count ("412 / 1,280 assets") or a percentage in the text face with tabular figures. The bar is never burnt sienna. Prefer counts for long operations: a number people can check beats an open-ended animation. indeterminate exists for the moments you genuinely cannot count.

The bar is a progressbar named by label, with aria-valuetext matching the readout.

Properties​

PropertyAttributeTypeDefaultDescription
valuevaluenumber0Current value.
maxmaxnumber100Maximum value, e.g. the total asset count.
labellabelstring''What is progressing, e.g. "Cataloguing assets". Names the progressbar; shown unless hide-label.
hideLabelhide-labelbooleanfalseVisually hide the label (it still names the bar).
unitunitstring''Unit for the count readout, e.g. "assets". Plural is your job.
readoutreadout'count' | 'percent' | 'none''count'count ("412 / 1,280 assets", default), percent ("32%") or none.
readoutPositionreadout-position'inline' | 'below''inline'inline (default, opposite the label) or below the bar, centred, as in the loading state.
indeterminateindeterminatebooleanfalseNo known total. Prefer counts for anything long.
localelocalestring'en-GB'Locale for number formatting.

CSS parts​

PartDescription
labelThe visible label.
readoutThe count or percentage (text face, tabular figures).
trackThe bar track (the progressbar).
fillThe bar fill.

CSS custom properties​

PropertyDescription
--mm-progress-widthWidth of the element. Defaults to 100% of its container.

Examples​

Every state of mm-progress in Storybook, with keyboard and screen reader tests.