Skip to content
Haze UI

Activity rings card

High-impact concentric triple progress rings with bold rounded strokes, subtle halo depth, and minimal color-matched tabular readouts.

pnpm dlx shadcn@latest add @haze/apple-activity-card
Open preview in a new tab
Liveno JavaScript

When to use

  • A summary card tracks three concurrent daily or sprint goals against numeric targets at a glance
  • You want an iconic radial ring graphic paired with clean tabular-nums ratios and units

When not to use

  • Only a single completion percentage is needed. Use progress-ring.
  • Parts add up to a shared 100% total rather than independent targets. Use donut-chart.

Installation

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

pnpm dlx shadcn@latest add @haze/apple-activity-card
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
titlestring"Activity Rings"Centered card heading text.
rings{ label: string; value: number; target: number; unit: string; tone?: "destructive" | "success" | "brand" | "warning" }[]–Up to three concentric activity rings ordered from outer to inner.
headingLevel2 | 3 | 43Heading level for the card title.
classstring–Additional classes on the outer card element.

Accessibility

  • The concentric rings SVG exposes role="img", aria-label, and an embedded <title> summarizing all three rings.
  • Each numeric readout row carries role="progressbar" with aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext so progress is never conveyed by color alone.

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 "Activity rings card" with `npx shadcn@latest add @haze/apple-activity-card`. 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 AppleActivityCard from "@/components/haze/ui/apple-activity-card.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/apple-activity-card.md

  • Customize with real content

    Adapt the Haze apple-activity-card ui for our product. Replace the demo values of these props with our real content: title, rings, headingLevel, class. Keep the layout, the heading level rules and these accessibility details: The concentric rings SVG exposes role="img", aria-label, and an embedded <title> summarizing all three rings. Each numeric readout row carries role="progressbar" with aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext so progress is never conveyed by color alone. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using apple-activity-card, check it fits: use it when a summary card tracks three concurrent daily or sprint goals against numeric targets at a glance; you want an iconic radial ring graphic paired with clean tabular-nums ratios and units. Avoid it when only a single completion percentage is needed. use progress-ring.; parts add up to a shared 100% total rather than independent targets. use donut-chart.. Alternatives: @haze/progress-ring, @haze/donut-chart, @haze/usage-meter.

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