Overlapping distributions, one per row, masked by the background so upper ridges sit in front, a median tick on each, a signal marker at a change, and ridges that rise row by row.
pnpm dlx shadcn@latest add @beautiful-ui-pro/ridgelineNeeds 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.
import { Ridgeline, type Ridge } from "@/components/ui/notchset/ridgeline";
const bump = (peak: number, width: number) => Array.from({ length: 33 }, (_, i) => Math.exp(-(((i / 4 - peak) / width) ** 2)));
const weeks: Ridge[] = [
{ label: "W33 · AUG 10", median: 3.8, density: bump(3.8, 1.4) },
{ label: "W34 · AUG 17", median: 2.1, density: bump(2.1, 0.7), emphasis: true },
{ label: "W35 · AUG 24", median: 2.1, density: bump(2.1, 0.7), emphasis: true },
];
export function LatencyByWeek() {
return <Ridgeline rows={weeks} xMax={8} marker={{ before: 1, label: "ATLAS 3 FLASH · AUG 14" }} />;
}rows–
{ label, median, density, emphasis?, detail? }[]Top to bottom.
xMax / ticks–
number / number[]The axis.
marker–
{ before, label }A change between rows.
unit–
stringAfter values.
components/ui/notchset/ridgeline.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.