Score ring
npx shadcn add @klarhimmel/score-ringCopy for AIDetailsAbout, usage, props and more
A score from 0 to 100 with a text equivalent. Unassessed is distinct from zero.
When to use
Use for
Bounded audit and quality scores with a readable text equivalent.
Not for
Loading or completion progress. Use Progress.
Pairs with
Audit overview and module cards.
Preview
Import
Import
- Files
- score-ring.tsx, in components/klarhimmel/ui/. With it: theme, utils.
- Render in
- Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | null | required | 0–100; null or a non-finite value is unassessed. Values are clamped. |
label | ReactNode | required | Names the score in its visible caption. |
unavailable | ReactNode | 'Not assessed' | Caption for an unassessed score. |
className | string | - |
Accessibility
| Key | Does |
|---|---|
Screen reader | Reads the label and score caption; the ring is decorative. |