KQ-839 · RISK/METER
Risk Meter
A meter beneath a proposed action that fills toward its risk: the fill is a scaleX on glide, toned cobalt, warn or danger by band, with two threshold ticks on the track, and a band label rides above it with its centre on the fill's leading edge while its word rolls up or down on snap. In the high band the action control arms a confirm — the first press rolls Run into Confirm on the destructive tone, the second runs, and Escape or a change of risk disarms.
KQ-839 · RISK/METER
Reply to the customer
Risk12%
Risk 0.12 · low
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/risk-meter
Props
- risk
- number
- default —
- The action's risk, 0 to 1.
- action
- string
- default —
- What the model proposes to do, printed above the meter.
- thresholds
- [number, number]
- default [0.35, 0.7]
- Where the moderate and high bands begin; the high band arms the confirm.
- bands
- [string, string, string]
- default ["Low", "Moderate", "High"]
- The band words.
- runLabel
- string
- default "Run"
- Copy on the action control.
- confirmLabel
- string
- default "Confirm"
- Copy on the armed control.
- onRun
- () => void
- default —
- Fires when the action runs: one press below the high band, the second press in it.
- onArmChange
- (armed: boolean) => void
- default —
- Fires from the press or key that armed or disarmed the confirm.
- label
- string
- default —
- Names the meter and its group for assistive technology.
| Prop | Type | Default | Description |
|---|---|---|---|
| risk | number | — | The action's risk, 0 to 1. |
| action | string | — | What the model proposes to do, printed above the meter. |
| thresholds | [number, number] | [0.35, 0.7] | Where the moderate and high bands begin; the high band arms the confirm. |
| bands | [string, string, string] | ["Low", "Moderate", "High"] | The band words. |
| runLabel | string | "Run" | Copy on the action control. |
| confirmLabel | string | "Confirm" | Copy on the armed control. |
| onRun | () => void | — | Fires when the action runs: one press below the high band, the second press in it. |
| onArmChange | (armed: boolean) => void | — | Fires from the press or key that armed or disarmed the confirm. |
| label | string | — | Names the meter and its group for assistive technology. |