Infographic Bar
Composable continuous stat-card band. Lays out N stat-cards as a single infographic strip — outer corners rounded, inner corners square, hairline dividers, no full per-card borders. Theme-portable across bordered and borderless palettes.
Preview
A KPI row that reads as one continuous band — not four separate cards butting together. The band owns the frame, radius, and elevation; each stat-card sheds its own chrome.
Highlighted cell
Set variant: "highlight" on any cell to tint it. Only the surface changes — the band's continuous frame and dividers stay intact.
Compact density
Pass size="sm" to tighten every cell for dense dashboards.
Installation
npx visor add infographic-barThis copies two files into your project:
components/ui/infographic-bar/infographic-bar.tsx— the componentcomponents/ui/infographic-bar/infographic-bar.module.css— the styles
StatCard is installed automatically as a dependency.
Usage
import { InfographicBar } from '@/components/ui/infographic-bar/infographic-bar';
export default function Example() {
return (
<InfographicBar
stats={[
{ label: 'Total Revenue', value: '$48,120', delta: { value: '+12.4%', direction: 'up', label: 'vs last month' } },
{ label: 'Active Users', value: '892', delta: { value: '+3.1%', direction: 'up' } },
{ label: 'Churn Rate', value: '3.2%', delta: { value: '-0.4%', direction: 'down' } },
]}
/>
);
}Theming
InfographicBar is theme-agnostic and reads correctly in both bordered and borderless palettes:
- Outer frame uses
--border-default. Borderless themes set this totransparent, so the band's frame drops away and it melts into the page. - Dividers use
--hairline— the house soft-separator token, lighter than a full border. Override--infographic-bar-dividerto retune them, includingtransparentfor a fully seamless band. - Corners round via
overflow: hiddenon the band, so outer cells round and inner cells stay square for any number of cells.
API Reference
InfographicBarProps
| Prop | Type | Default | Description |
|---|---|---|---|
stats* | InfographicBarStat[] | — | Ordered stat cells, rendered left-to-right as a single continuous band. Each item is a subset of StatCardProps (label, value, delta, trend, trendPosition, footer, variant, valueAs) plus an optional id. |
stats[].label* | React.ReactNode | — | Small uppercase label describing the metric. |
stats[].value* | React.ReactNode | — | Prominent metric value rendered in a large display size. |
stats[].delta | StatCardDelta | — | Change indicator with value, direction ("up" | "down" | "flat"), and optional context label. |
stats[].variant | 'default' | 'highlight' | 'default' | Per-cell visual emphasis. Highlight tints that cell’s surface; the band frame and dividers stay continuous. |
stats[].id | string | — | Stable React key for the cell. Falls back to the array index when omitted. |
size | 'sm' | 'md' | 'md' | Dimensional density forwarded to every cell. |
className | string | — | Additional CSS class names merged onto the band element. |
...props | React.HTMLAttributes<HTMLDivElement> | — | All standard HTML attributes are forwarded to the band div. |
The component also forwards all standard HTML attributes to the band <div>.
InfographicBarStat
Each entry in stats is a subset of StatCardProps: label, value, delta, trend, trendPosition, footer, variant, valueAs, plus an optional id used as the React key.
Accessibility
Each cell is a StatCard, which announces its delta direction (up, down, flat) to screen readers via visually-hidden text alongside the visible glyph — color is never the sole signal. The cells default to <article> landmarks, so the band exposes one landmark per metric.
Filter Bar
Admin filter bar compound — search input, filter controls slot, removable active-filter chips, results count, and a clear-all affordance above a data-table. Built with CSS Modules and container queries — copy it into your project and own it completely.
Kbd
Tiny primitive for rendering keyboard shortcuts using the semantic <kbd> element. Supports a single key via children or a multi-key sequence via the keys prop with a customizable separator. Built with CSS Modules — copy it into your project and own it completely.