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”.
finance88%
legal<1%
support11%
salesNot given
<div className="flex w-full max-w-400 flex-col gap-4">
<ProbabilityBar label="finance" value={0.8812} highlight />
<ProbabilityBar label="legal" value={0.0041} />
<ProbabilityBar label="support" value={0.1105} />
<ProbabilityBar label="sales" value={null} />
</div>import { ProbabilityBar } from "@logicplanes/kaeso-ui/playground";Props
aria-labelstringThe meter's accessible name, when the label isn't plain text.
highlightboolean = falseMarks the bar as the answer: the data colour, medium-weight text, and “chosen” after its value for screen readers.
labelReactNodeWhat the probability is of: an option, a level, Yes or No.
layout"row" | "inline" | "stacked" = inlineLabel, bar and value on one line, the label and value above the bar, or one row of a
grid-cols-metergrid so a list's bars line up.pendingboolean = falseThe value is on its way: the track pulses quietly and screen readers skip it.
valuenumber | nullThe probability from 0 to 1; null or absent when the provider left it out.