Skip to content
Haze UI

Progress ring

Compact circular SVG progress indicator with centered percentage readout and semantic status tones.

pnpm dlx shadcn@latest add @haze/progress-ring
Open preview in a new tab
Liveno JavaScript

When to use

  • Showing task, quota, or upload completion inline next to a label or list item
  • Compact card headers where a full gauge or linear bar takes too much room

When not to use

  • Linear file transfer bars belong in progress
  • Indeterminate loading waits belong in spinner

Installation

Add the Haze registry to components.json once, then install Progress ring with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/progress-ring
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
label*string–Accessible name for the progressbar and optional visible label.
valuenumber72Current completion amount.
maxnumber100Maximum completion value.
size"sm" | "md" | "lg""md"Ring diameter preset.
variant"default" | "info" | "success" | "warning" | "destructive""default"Semantic stroke tone.

Accessibility

  • Exposes native role='progressbar' with aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext.
  • Decorative SVG arc carries aria-hidden='true' so screen readers announce the semantic percentage cleanly.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI component "Progress ring" with `npx shadcn@latest add @haze/progress-ring`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import ProgressRing from "@/components/haze/ui/progress-ring.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/ui/progress-ring.md

  • Customize with real content

    Adapt the Haze progress-ring ui for our product. Replace the demo values of these props with our real content: label, value, max, size, variant. Keep the layout, the heading level rules and these accessibility details: Exposes native role='progressbar' with aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext. Decorative SVG arc carries aria-hidden='true' so screen readers announce the semantic percentage cleanly. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using progress-ring, check it fits: use it when showing task, quota, or upload completion inline next to a label or list item; compact card headers where a full gauge or linear bar takes too much room. Avoid it when linear file transfer bars belong in progress; indeterminate loading waits belong in spinner. Alternatives: @haze/progress, @haze/gauge, @haze/spinner.

Dependencies

  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog