How far along something is - a bar or a ring, determinate or not. Built for agent runs and uploads.
On this page
Used for
- Upload progress
- Eval run completion
- Budget used
- Setup steps
- Indexing jobs
Examples
Upload row
Sizes
Segments
Ring
Value label
Indeterminate
Right to left
Installation
npx knowns-ui@latest add progressFor Claude Code, Cursor or Codex: installs it and wires the props to your own data.
Paste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install prompt
Install Progress from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/progress
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add progress
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- lib/knowns/motion.tsx
- lib/knowns/motion-utils.ts
- components/ui/knowns/use-floating.ts
- components/ui/knowns/tooltip.tsx
- components/ui/knowns/tooltip-utils.ts
- components/ui/knowns/progress.tsx
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0, class-variance-authority@^0.7.1.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/progress, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "progress" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- label / aria-label
ReactNode / string- One is required. label is shown above the bar and names it (aria-labelledby).
- value / max
number- Default
0 / 100 - Clamped into 0…max. role=progressbar with aria-valuenow / min / max / valuetext.
- segments / readout / unit
{ value, tone?, color?, label? }[] / boolean / string- Default
- / false / - - A bar in parts over one max (value is ignored). readout writes “62% 24 of 39 issues” for the first part. Parts with a label have a tooltip, and aria-valuetext lists them all.
- valueLabel
"right"|"bottom"|"top"|"none"- Default
"right" - Where the value text sits. top puts it on the label row.
- format
(value, pct) => string- Default
"42%" - Value text, also aria-valuetext. Wins over formatOptions; use it for steps.
- formatOptions / locale
Intl.NumberFormatOptions / string- Format the value with Intl: percent, currency, unit. style percent formats the share of max.
- helper
ReactNode- A line under the bar, linked with aria-describedby.
- indeterminate
boolean- Default
false - A band of light with a glow crosses the track (transform only, linear). Parked mid-rail under reduced motion. No aria-valuenow, aria-busy set.
- tone
"neutral"|"accent"|"info"|"success"|"warning"|"danger"- Default
"neutral" - Fill colour.
- size
"sm"|"md"|"lg"- Default
"md" - 4, 6 or 8px track.
- ProgressCircle.size
"sm"|"md"|"lg"|number- Default
"md" - 20, 36 or 56px preset, or any px size (16, 24, 32). The stroke scales with it.
- ProgressCircle.showValue
boolean- Default
false - Value in the middle (36px and up).
- ProgressCircle.label / aria-label
string- One is required: the ring has no visible label.
| Prop | Type | Default | Description |
|---|---|---|---|
| label / aria-label | ReactNode / string | - | One is required. label is shown above the bar and names it (aria-labelledby). |
| value / max | number | 0 / 100 | Clamped into 0…max. role=progressbar with aria-valuenow / min / max / valuetext. |
| segments / readout / unit | { value, tone?, color?, label? }[] / boolean / string | - / false / - | A bar in parts over one max (value is ignored). readout writes “62% 24 of 39 issues” for the first part. Parts with a label have a tooltip, and aria-valuetext lists them all. |
| valueLabel | "right" | "bottom" | "top" | "none" | "right" | Where the value text sits. top puts it on the label row. |
| format | (value, pct) => string | "42%" | Value text, also aria-valuetext. Wins over formatOptions; use it for steps. |
| formatOptions / locale | Intl.NumberFormatOptions / string | - | Format the value with Intl: percent, currency, unit. style percent formats the share of max. |
| helper | ReactNode | - | A line under the bar, linked with aria-describedby. |
| indeterminate | boolean | false | A band of light with a glow crosses the track (transform only, linear). Parked mid-rail under reduced motion. No aria-valuenow, aria-busy set. |
| tone | "neutral" | "accent" | "info" | "success" | "warning" | "danger" | "neutral" | Fill colour. |
| size | "sm" | "md" | "lg" | "md" | 4, 6 or 8px track. |
| ProgressCircle.size | "sm" | "md" | "lg" | number | "md" | 20, 36 or 56px preset, or any px size (16, 24, 32). The stroke scales with it. |
| ProgressCircle.showValue | boolean | false | Value in the middle (36px and up). |
| ProgressCircle.label / aria-label | string | - | One is required: the ring has no visible label. |
What it handles
- 01Draws a bar with a 4, 6 or 8px track, or a ring with ProgressCircle, from `value` out of `max`, clamped between 0 and 100 percent.
- 02Requires a `label` or an `aria-label`, so every bar has a name, and reports `aria-valuenow` and `aria-valuetext`.
- 03Places the value text right, bottom or top with `valueLabel`, or hides it, and formats it with `format` or `formatOptions` and `locale`.
- 04Shows a `helper` line under the bar for things like "12.4 MB, about 20 seconds left".
- 05Switches to `indeterminate` when the amount of work is unknown: a band of light crosses the bar and the ring turns with a short arc.
- 06Fills from the right inside dir="rtl", and the ring fills clockwise from the top, counter-clockwise in rtl.
States
- First render
- Nothing. The bar paints at its value
- none
- Value change
- The fill slides to the new value
- 280ms, ease in-out
- Indeterminate bar
- A band of light crosses the bar in a loop
- none
- Indeterminate ring
- A short arc turns around the ring in a loop
- none
- Reduced motion
- The value lands at once and the band parks mid-rail
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | Nothing. The bar paints at its value | none |
| Value change | The fill slides to the new value | 280ms, ease in-out |
| Indeterminate bar | A band of light crosses the bar in a loop | none |
| Indeterminate ring | A short arc turns around the ring in a loop | none |
| Reduced motion | The value lands at once and the band parks mid-rail | 0ms |
Works with
When to use
When to use
- Known or unknown progress of a task, as a bar or a ring.
When not to use
- Usage against a plan limit: use Usage Meter.
- A small inline wait: use Spinner.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Progress to my app and wire it to my own data.
- I need known or unknown progress of a task, as a bar or a ring. Set that up with the Knowns UI Progress.
- Which Progress props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "progress" }) and search_docs({ query: "progress" }).