Krizaka UI
Krizaka UI
ComponentsData display

Gauge

One value against its range on a 240° arc: zones that change its tone, a target tick, the value written in the middle.

Web · ✓Mobile · ✓Desktop · ✓BetaCharts
Support level
Beta
Size
Not measured
Who uses it
No live product imports it yet
import { Gauge } from "@krizaka/charts/gauge";

Web and mobile — the same component for React and React Native. Beta: its API may still change in a minor version.

Why it is here. Its only users were products that left the organisation (2026-10-29): kept until the next major's audit decides.

When to use

  • A quota: credits used of a plan, with a warning zone before the limit.
  • Progress towards a goal with a target: a challenge's escrow against its objective.
  • A load or a score that has a known range.

When not to use

  • Several values side by side (a gauge per item takes room and compares badly).Use instead: Bar chart
  • A value without a meaningful range.Use instead: Sparkline

Installation

Install

npm install @krizaka/charts

Import

import { Gauge } from "@krizaka/charts/gauge";

Examples

Quota

Credits used of a plan: green, then warning past 80 %, danger past the plan.

Goal

A challenge's escrowed amount against its objective, a target tick on the arc.

Props

One figure against its range — credits used of a plan, a challenge's progress, a load.

PropTypeDefaultDescription
valuerequirednumber—The value.
actionsMenuboolean—The ⋯ actions menu of the kit. false: the former “Show data” and export buttons, drawn in line. Default true.
brandBrandId—The brand whose palette the charts use. Without it, a chart follows a .brand-<id> ancestor, else Krizaka. Set it when the app loads a brand stylesheet on :root (@krizaka/tokens/brands/sovkora.css).
captionstring—The words under the value (“of 50 000 credits”).
classNamestring—A class on the figure (layout: margins, grid placement).
descriptionReactNode—A sentence under the title: the period, the unit, the source.
emptyReactNode—What to show when there is nothing to draw (default: the empty label). An EmptyState of @krizaka /ui fits.
errorReactNode—The data could not be loaded: true says the default words, a node says yours (a retry button…).
formatValueFormat—How the value and the range are written.
heightnumber—The height of the plot in pixels. Default 280 (a sparkline: 32).
hideTitleboolean—Visually hide the title (it stays the chart's accessible name): a card that already has its heading.
idstring—The id of the figure.
insightReactNode—One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.
labelsChartLabelsInput—The words, translated: the buttons, the states, the written summary.
liveboolean—Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.
loadingboolean—The data is on its way: a skeleton of the chart, announced once.
localeLocale—The locale of every figure and date ("fr-FR"). Default "en-US".
maxnumber—The end of the range. Default 100.
minnumber—The start of the range. Default 0.
styleCSSProperties—Inline style on the figure (layout only: colours come from the tokens).
summary"hidden" | "visible"—The written summary: read by screen readers only ("hidden", default), or shown under the chart ("visible").
summaryTextstring—Your own summary instead of the generated one (still read first by screen readers).
targetThreshold—A tick on the arc: the objective.
titlestring—What the chart shows, in a few words: its accessible name, and its heading unless hideTitle. Inside a ChartCard, the card's title is the default.
toneTone—The tone of the value without zones. Default "accent".
zonesreadonly GaugeZone[]—Coloured zones along the arc: the value takes the tone of the zone it is in.

Accessibility

  • The gauge is a meter: its name is the title, its value, range and text (value and caption) are exposed.
  • The zone's tone is never the only signal: its label is in the summary.
  • The arc fills once, when the gauge comes on screen, and never under reduced motion.

Best practices

  • Say the range in caption (“of 50,000 credits”): the arc alone is not a number.
  • Give zones their meaning in label (“Over quota”): it is read in the summary.
  • Use one gauge per screen at most; a row of figures reads better as stats.

Generated from the code of @krizaka/ui 5.3.4: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page