ProbabilityBar

One probability as a bar beside its label and its value in percent, the chosen one marked; a value the provider left out reads “Not given”.

View source
finance88%
legal<1%
support11%
salesNot given
import { ProbabilityBar } from "@logicplanes/kaeso-ui/playground";

Props

  • aria-label
    string

    The meter's accessible name, when the label isn't plain text.

  • highlight
    boolean = false

    Marks the bar as the answer: the data colour, medium-weight text, and “chosen” after its value for screen readers.

  • label
    ReactNode

    What the probability is of: an option, a level, Yes or No.

  • layout
    "row" | "inline" | "stacked" = inline

    Label, bar and value on one line, the label and value above the bar, or one row of a grid-cols-meter grid so a list's bars line up.

  • pending
    boolean = false

    The value is on its way: the track pulses quietly and screen readers skip it.

  • value
    number | null

    The probability from 0 to 1; null or absent when the provider left it out.