Mirrored Pill Bars
A shadcn chart card where each slot grows up and down from a center line as stacks of small pills, for paired flows like sent and received.
Interactive preview · desktop · dark
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
example.tsx
import { MirroredBarsChart } from '@/components/component-kit/items/chart-mirrored-bars';
export function Example() { return ( <MirroredBarsChart title="Webhook traffic" summaryLabel="Events today" series={{ up: { label: 'Delivered' }, down: { label: 'Retried' } }} data={[ { label: '6a', up: 40, down: 12 }, { label: '9a', up: 95, down: 30 }, { label: '12p', up: 120, down: 48 }, ]} /> );}Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | MirroredBarsDatum[] | — | One row per slot with up and down magnitudes. |
series | { up, down } | Outbound / Inbound | Labels and light/dark colors for the two directions. |
pill | { height, gap } | 5 / 3 | Pill height and spacing in pixels. |