Skip to main content

MiniBar

An inline proportional bar for a table cell. Matte by design — a bar on every row is chrome, not a chart.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

An inline proportional bar for a table cell.

Accessibility​

Rendered as a real <table> with header scopes; sortable columns expose aria-sort. Row selection and actions are keyboard reachable.

Install and import​

npx shadcn@latest add @prism/mini-bar
import { MiniBar } from '@/components/prism/MiniBar';

In a no-build prototype, read it from the bundle instead: const { MiniBar } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
valuenumberYes
maxnumber—Denominator. Default 100.
tone"accent" | "positive" | "notice" | "negative" | "neutral"—
showValueboolean—Show the numeric value beside the bar. Default true.
formatValue(value: number) =&gt; string—
widthnumber | string—Track width — number (px) or any CSS length. Default 72px.
labelstring—What the bar measures, folded into the screen-reader label.
classNamestring—