Meter

A limit or quota: label and value, a 6px track cut square, threshold ticks and a caption. Progress for work.

View source
Monthly budget$32.10 of $50.00
Resets in 12 days
import { Meter, Progress } from "@logicplanes/kaeso-ui";

Props

  • aria-label
    string

    The accessible name, for when there is no visible label.

  • caption
    ReactNode

    "Resets in 12 days"; near or over the limit, say what happens, such as "Over the limit: requests are refused".

  • label
    ReactNode

    The label above the bar, or the caption under a gauge's arc.

  • leading
    ReactNode

    Leading content in the label row (an icon).

  • shape
    "bar" | "gauge" = bar

    A bar (bar), or a half circle with square ends (gauge) with the number in its middle and, under its caption, near or over the limit.

  • thresholds
    number[]

    Alert thresholds as ratios, drawn as ticks: [0.5, 0.8]. A gauge marks 0.8 when none are given.

  • tone
    "neutral" | "auto" = auto

    Colors the bar by how full it is (auto) or keeps it neutral.

  • trailing
    ReactNode

    Content at the end of the label row, such as the value.

  • value
    number

    0–1 (or more when over the limit).

  • valueLabel
    ReactNode

    "$32.10 of $50.00"

  • valueText
    string

    What screen readers hear as the value when valueLabel is not plain text, such as a shortened figure with the exact one in a tooltip: "10,624,184 of 100,000,000".