Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Progress Group

The stages of one task stacked on one bar, such as uploaded, processed and published, with a legend that names each one.

Built on the headless Progress Group.See its API in Docs

Rendered by React 19.3.1

progress-group.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/progress-group.json

It also adds utils. The app needs its setup first: Installation.

Usage

Pass value, an array of amounts out of max (100 by default); null makes the whole group indeterminate. ProgressGroup renders only its children: a ProgressGroupLabel names the group, ProgressGroupValue shows the total, a ProgressGroupTrack holds one ProgressGroupIndicator per value, and one ProgressGroupItem per value, with a ProgressGroupItemLabel and a ProgressGroupItemValue, is the legend. Indicator and Item take the index of their value. Each Item is a progressbar that screen readers reach; keep one Item per value, visually hidden where no legend shows. Every part carries data-progressing, data-complete once the total reaches max, or data-indeterminate. The roles and values come from the headless Progress Group. For one value, use the Progress.

import {
  ProgressGroup,
  ProgressGroupIndicator,
  ProgressGroupItem,
  ProgressGroupItemLabel,
  ProgressGroupItemValue,
  ProgressGroupLabel,
  ProgressGroupTrack,
  ProgressGroupValue,
} from '@/components/ui/progress-group'

Examples

Default

An upload in three stages, with the total done and its legend.

Its preview and code are at the top of the page.

The classes are Meter Group's: segments and legend dots in the primary colour, fading by data-index, a 2 px gap between segments, outlines under forced colours. While indeterminate the segments have no width, as Progress's indicator has none; style [data-indeterminate] to animate the track. This item takes Base UI's component ID as its slug.

API reference

The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Progress Group's API reference.