Line chart
A multi-series line chart with a gliding crosshair, legend toggles, and paths that morph between ranges.
See a year of activity at a glance, one square per day.
npx shadcn@latest add @silicon-ui/activity-heatmapnpx shadcn@latest add @silicon-ui/activity-heatmapInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/activity-heatmap/activity-heatmap.tsxcomponents/silicon-ui/activity-heatmap/activity-heatmap.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
days*One entry per day, oldest first. Days missing inside the range count as zero. | ActivityDay[] | — |
label*Accessible name for the grid, such as "Contributions in 2025". | string | — |
period*Finishes the summary line: "1,284 contributions in {period}". | string | — |
unitNouns for the count. | { one: string; other: string } | CONTRIBUTIONS |
thresholdsUpper bounds for levels one to three; anything above the last is level four. Defaults to quarters of the busiest day. | [number, number, number] | — |
weekStartsOn | 0 | 1
| 0 |
selectedDate | string | null | null |
onSelectDate | (date: string) => void | — |
actionsControls beside the summary, such as a range switch. | ReactNode | — |
localeFormatting locale. Fixed by default so server and client render the same labels. | string | "en-US" |
className | string | — |