{"name":"progress","title":"Progress","description":"","kind":"component","category":"feedback","status":"beta","props":{"value":{"type":"number","description":"Between min and max; out-of-range values are clamped. null (or omitted) is indeterminate."},"min":{"type":"number","default":0},"max":{"type":"number","default":100},"label":{"type":"string","description":"Shown above the track at the start, and the progress bar's name."},"ariaLabel":{"type":"string","default":"Progress","description":"The progress bar's name when there is no visible label (aria-label)."},"showValue":{"type":"boolean","default":false,"description":"Shows the value above the track at the end (\"42%\"; nothing while indeterminate)."},"valueText":{"type":"string","description":"The text shown as the value instead of the percentage (\"3 of 8 files\"); also aria-valuetext."},"tone":{"type":"enum","values":["orange","green","red","accent"],"default":"orange","description":"The range's colour, as the progress ring."},"size":{"type":"enum","values":["sm","md"],"default":"md","description":"The track's height: sm 4px, md 6px."}},"playground":{"name":"Playground","props":{"value":2140,"max":3000,"label":"Build minutes this month","showValue":true,"valueText":"2,140 of 3,000 min","tone":"accent","size":"md"},"width":320},"exampleFiles":[{"file":"build-minutes","title":"Build minutes this month"},{"file":"plan-limits","title":"Close to the plan’s limits"},{"file":"upload-file","title":"Uploading a file"},{"file":"preparing-export","title":"Preparing an export"},{"file":"migration-steps","title":"Steps of a migration"}],"worstCase":[{"name":"Long label, long value text","width":220,"props":{"value":12480,"max":20000,"label":"Reconciling the supplier invoices for the third quarter against the purchase orders","showValue":true,"valueText":"12,480 of 20,000 rows"}},{"name":"Out of range","width":220,"props":{"value":140,"label":"Over","showValue":true}},{"name":"Below range","width":220,"props":{"value":-20,"label":"Under","showValue":true}},{"name":"Right-to-left","width":220,"props":{"value":30,"label":"جارٍ التحميل","showValue":true}},{"name":"Narrow","width":48,"props":{"value":50,"label":"Sync","showValue":true}},{"name":"Unbreakable label","width":200,"props":{"value":5,"label":"averyveryveryverylongunbrokenlabelwithoutanyspacesatall","showValue":true}}],"anatomy":[{"part":"root","element":"div","description":"Ark's progress root: data-state=loading|complete|indeterminate, --percent (0..100) for the range. A two-column grid: label at the start and value at the end on the first row, the track across both on the second."},{"part":"label","element":"span","optional":true,"description":"What is progressing (12px/500 ink-2); it names the progress bar (aria-labelledby). Wraps, never cut; author text keeps its own direction."},{"part":"value","element":"span","optional":true,"description":"Ark's value text (\"42%\", or the caller's formatted text): 12px ink-2, tabular figures, never wraps; aria-hidden (the progressbar already carries the value)."},{"part":"track","element":"div","description":"role=progressbar with aria-valuemin, aria-valuemax and aria-valuenow (none while indeterminate), named by the label or by the label prop. Full width, rounded pill, color.line, clips the range. Indeterminate: its ::before is a band a quarter of the track wide that sweeps along it."},{"part":"range","element":"div","description":"The filled part: as wide as the track, rounded pill, in the tone; moved by translateX(percent - 100%) (mirrored right-to-left). Indeterminate: it waits out of sight at translateX(-100%), so a value that arrives only grows from the start."}],"states":["loading","complete","indeterminate"],"tokens":["color.line","color.orange","color.green","color.red","color.accent","color.ink-2","radius.pill","text.xs","duration.move","easing.out-strong"],"a11y":{"role":"progressbar","notes":["The track is the progressbar: aria-valuenow is the value (none while indeterminate), aria-valuemin / aria-valuemax the range, aria-valuetext the valueText when given.","Give it a name that says what is progressing: the label (visible) or ariaLabel.","The visible value is aria-hidden: the progressbar already announces it."]},"motion":["range: transform over duration.move easing.out-strong when the value changes (the ring's arc timing); jumps under prefers-reduced-motion","indeterminate: a band (the track's ::before, never the range, so the range's transform never changes kind) sweeps along the track, 1.4s linear, looping (it is the loading signal, so it keeps moving under reduced motion, like the spinner)","nothing animates on mount"]}