Line chart
A multi-series line chart with a gliding crosshair, legend toggles, and paths that morph between ranges.
Overlapping distributions, one ridge per group: hover to lift a ridge and read its quartiles, switch datasets and every curve morphs.
npx shadcn@latest add @silicon-ui/ridgelinenpx shadcn@latest add @silicon-ui/ridgelineInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/ridgeline/ridgeline.tsxcomponents/silicon-ui/ridgeline/ridgeline.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
series*One ridge per series, drawn top to bottom. | RidgelineSeries[] | — |
label*What is measured, such as "Daily highs in Zurich". Names the chart for assistive technology. | string | — |
unitUnit after each value, such as "°C". | string | "" |
formatValue | (value: number) => string | — |
domainValue range of the axis. Defaults to the data with a little room on each side. | [number, number] | — |
overlapHow far a ridge may rise into the rows above, in row heights. | number | 2.4 |
rowHeightHeight of one row in pixels. | number | 30 |
bandwidthSmoothing in value units. Defaults to Silverman's rule per series. | number | — |
tintShades each ridge by its median, from a light tint to the full first series color, and shows the scale under the axis. | boolean | true |
activeControlled id of the lifted ridge. | string | null | — |
defaultActive | string | null | null |
onActiveChange | (id: string | null) => void | — |
emptyLabel | string | "No data yet" |
ref | Ref<HTMLElement> | — |
className | string | — |