073
A total and what it's made of, in one small card: switch the period and the figures roll, the bar re-proportions and the ranked rows quietly trade places.
akabreakdown·stacked bar
Run this in any project set up for the shadcn CLI. It copies the Split Card source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/split-card.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { SplitCard } from "@/components/split-card";
export default function Page() {
return <SplitCard />;
}A free React component in the Numbers collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Split Card source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| title | string | "Breakdown" |
| periodsrequired | SplitPeriod[] | — |
| defaultPeriod | string | — |
| format | (value: number) => string | defaultFormat |
| good | "up" | "down" | "up" |
| maxRows | number | 5 |
| className | string | — |