# Quality Score

> A bare token-driven quality rating input — five ascending bars fill with the brand gradient up to the chosen score, native radio semantics, hover preview, Poor→Excellent hints, and a visible gradient readout backed by a polite live region — themed by the AI Steppers design system.

- Category: Input
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Sunset Coast
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Page: https://builder.atheros.ai/components/quality-score
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_quality_score/preview-6411efb8ffd8.webp

## Features

- Bare centered rating input with a small on-brand title group — no panel card or button chrome
- Five ascending bars (20% to 100% tall) acting as a 1–5 radiogroup from Poor to Excellent
- Bars up to and including the chosen score fill with the brand two-color gradient
- Gradient fill appears with a brief opacity fade and no rising or staggered motion
- Selected bars carry a soft layered glow derived from the gradient start color
- Hover previews the gradient fill and glow on any bar with a quiet 0.1s fade before committing
- Springy `scale(0.97)` press on every bar while it is held down
- Native hidden radio inputs keep full keyboard and screen-reader semantics
- Visible score readout — gradient number plus its wording — updates on every change
- Visually-hidden live region announces "Output score X of 5" plus its wording on every change
- Poor/Excellent hint row anchors the scale ends
- Dark mode via `body.dark` flips the gradient (pink→blue light, violet→teal dark)
- Responsive layout that adapts down to 320px
- Fully respects `prefers-reduced-motion`

## Accessibility

- **Radiogroup semantics** — `role="radiogroup"` labelled by the visible title via `aria-labelledby`
- **Native inputs** — Each bar is a `<label>` for a real hidden `<input type="radio">`
- **Radio labels** — Every radio carries an explicit `aria-label` ("1 — Poor" … "5 — Excellent")
- **Live readout** — Visually-hidden `role="status"` with `aria-live="polite"` announces the chosen score; the visible readout is `aria-hidden` to avoid double announcement
- **Keyboard navigation** — Arrow keys move between scores via native radio behavior
- **Decorative hints** — The Poor/Excellent hint row is `aria-hidden="true"`
- **Focus indicators** — `:focus-visible` with a 2px `--primary` outline on the focused bar
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations

## Keyboard shortcuts

- `ArrowRight / ArrowUp` — Select the next higher score
- `ArrowLeft / ArrowDown` — Select the next lower score
- `Space` — Check the focused radio (when none is selected)
- `Tab` — Move focus to the checked bar

## Common questions

**Which frameworks is Quality Score available in?**

Quality Score ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is the Quality Score input component free?**

Quality Score is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Quality Score support dark mode?**

Yes. Quality Score ships light and dark themes, both drawn from the Sunset Coast design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Quality Score live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/quality-score

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
