Slope chart
Items connected between two moments to show who rose and who fell.
| Item | 2025 | 2026 | Change | Rank |
|---|---|---|---|---|
| Docs | 62 | 78 | 16 | 2 to 1 |
| Support | 71 | 69 | -2 | 1 to 2 |
| Billing | 48 | 66 | 18 | 3 to 3 |
When to use
- Before and after comparisons.
- Two time points across many items.
When not to use
- More than two time points; use a bump chart.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/slope-chart
Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
SlopeChart
8 props
PropTypeDefault
label *string—
data *readonly SlopeItem[]—
startLabel *string—
endLabel *string—
formatValue((value: number) => string)numberText
loadingboolean—
errorstring—
classNamestring—
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-label, aria-busy and aria-hidden in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/slope-chart.mdThe index of every part is at /llms.txt.