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 barWhen 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
| Prop | Type | Required | Description |
|---|---|---|---|
value | number | Yes | |
max | number | — | Denominator. Default 100. |
tone | "accent" | "positive" | "notice" | "negative" | "neutral" | — | |
showValue | boolean | — | Show the numeric value beside the bar. Default true. |
formatValue | (value: number) => string | — | |
width | number | string | — | Track width — number (px) or any CSS length. Default 72px. |
label | string | — | What the bar measures, folded into the screen-reader label. |
className | string | — |