Returns calendar
FreeA month calendar coloured by daily return, with a compounded total.
pnpm dlx shadcn@latest add https://caliperui.site/r/returns-calendar.jsonSeptember 2026
| Date | Return |
|---|---|
| 2026-09-01 | −1.50% |
| 2026-09-02 | +1.25% |
| 2026-09-03 | +0.75% |
| 2026-09-04 | +0.25% |
| 2026-09-05 | −0.25% |
| 2026-09-06 | −0.75% |
| 2026-09-07 | −1.25% |
| 2026-09-08 | +1.50% |
| 2026-09-09 | +1.00% |
| 2026-09-10 | +0.50% |
| 2026-09-11 | 0.00% |
| 2026-09-12 | −0.50% |
| 2026-09-13 | −1.00% |
| 2026-09-14 | −1.50% |
| 2026-09-15 | +1.25% |
| 2026-09-16 | +0.75% |
| 2026-09-17 | +0.25% |
| 2026-09-18 | −0.25% |
| 2026-09-19 | −0.75% |
| 2026-09-20 | −1.25% |
| 2026-09-21 | +1.50% |
| 2026-09-22 | +1.00% |
| 2026-09-23 | +0.50% |
| 2026-09-24 | 0.00% |
| 2026-09-25 | −0.50% |
| 2026-09-26 | −1.00% |
| 2026-09-27 | −1.50% |
| 2026-09-28 | +1.25% |
| 2026-09-29 | +0.75% |
| 2026-09-30 | +0.25% |
When to use #
Use it for
- Daily performance for a portfolio or a metric.
- Spotting streaks and bad days in a month.
Skip it when
- Values are not signed changes.
Installation #
pnpm dlx shadcn@latest add https://caliperui.site/r/returns-calendar.json
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage #
This is the code behind the preview above. It is built from ReturnsCalendar, compound and signedPercent.
import { ReturnsCalendar } from "@/components/ui/returns-calendar" const returns = Array.from({ length: 30 }, (_, index) => ({ date: `2026-09-${String(index + 1).padStart(2, "0")}`, value: Math.round((((index * 37) % 13) - 6) * 25) / 100, })); export function MonthlyReturns() { return ( <div className="w-full max-w-md"> <ReturnsCalendar label="Daily returns, September 2026" data={returns} month="2026-09" /> </div> ); }
API reference #
ReturnsCalendar
component
compound
component
No props of its own; it accepts the native props of its root element.
signedPercent
component
No props of its own; it accepts the native props of its root element.
Accessibility #
It exposes grid, row, columnheader, gridcell and status semantics, with aria-label, aria-busy, aria-live, aria-hidden and aria-selected kept in step with state. Changes that matter are announced through a live region.
Motion #
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.