Bars that re-rank and grow frame by frame with a rescaling axis, values in a fixed-width rolling column, and a play button with a month scrubber.
pnpm dlx shadcn@latest add @beautiful-ui-pro/race-bar-chartNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { RaceBarChart, type RaceSeries } from "@/components/ui/notchset/race-bar-chart";
const months = ["JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE"];
const runs: RaceSeries[] = [
{ label: "Planner", family: 0, values: [40e3, 84e3, 132e3, 184e3, 244e3, 310e3] },
{ label: "Triage", family: 1, values: [30e3, 64e3, 104e3, 152e3, 202e3, 256e3] },
{ label: "Coder", family: 2, values: [2e3, 6e3, 14e3, 28e3, 50e3, 82e3] },
];
export function RunsRace() {
const [month, setMonth] = React.useState(0);
return (
<div className="grid gap-2">
<h3 className="font-mono text-sm">{months[month]}</h3>
<RaceBarChart series={runs} frames={months} frame={month} onFrameChange={setMonth} />
</div>
);
}series–
{ label, family?, values }[]One value per frame each.
frames–
string[]Frame names.
frame / defaultFrame / onFrameChange–
number / (f) => voidControlled or not.
components/ui/notchset/race-bar-chart.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.