Components
Calendar
A month grid for choosing a day or a range, usable on its own or inside a picker.
pnpm dlx shadcn@latest add @caliper/calendarWhen to use
Use it for
- An always-visible date chooser on a booking or planning page.
- As the building block for date pickers.
Skip it when
- A date field in a form; use a date picker.
Installation
pnpm dlx shadcn@latest add @caliper/calendar
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 Calendar, formatISODate, isoDate and parseISODate.
import { useState, type ReactNode } from "react" import { Avatar } from "@/components/ui/avatar" import { Calendar, formatISODate } from "@/components/ui/calendar" function Panel({ title, context, className = "max-w-md", children }: { title: string; context: string; className?: string; children: ReactNode }) { return ( <section className={`grid w-full gap-5 rounded-overlay border border-border bg-background p-6 shadow-resting ${className}`}> <div className="grid gap-1"> <p className="font-medium">{title}</p> <p className="text-sm text-muted-foreground">{context}</p> </div> {children} </section> ); } const openTimes: Record<string, string> = { "2026-10-22": "3 open times", "2026-10-23": "5 open times", "2026-10-27": "2 open times", "2026-10-29": "4 open times", "2026-10-30": "1 open time" }; export function BookingCalendar() { const [day, setDay] = useState<string | null>("2026-10-23"); return ( <Panel title="Book a demo with Lena Fischer" context="30 minutes · video call · times in CET" className="max-w-sm"> <div className="flex items-center gap-3"> <Avatar name="Lena Fischer" className="size-10" /> <span className="grid text-sm"><span className="font-medium">Lena Fischer</span><span className="text-muted-foreground">Solutions, Halden Analytics</span></span> </div> <Calendar label="Choose a day" selected={day} onSelect={setDay} marks={(iso) => openTimes[iso]} showToday className="justify-self-center" /> <p role="status" className="text-sm text-muted-foreground">{day ? `${formatISODate(day)} · ${openTimes[day] ?? "no open times, try another day"}` : "Pick a day to see open times."}</p> </Panel> ); }
API reference
Calendar
component
formatISODate
component
No props of its own; it accepts the native props of its root element.
isoDate
component
No props of its own; it accepts the native props of its root element.
parseISODate
component
No props of its own; it accepts the native props of its root element.
Accessibility
It exposes grid and gridcell semantics, with aria-label, aria-disabled, aria-hidden, aria-live, aria-selected and aria-current 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.