Page parts
BlockDashboard, password reset and verification screens.
pnpm dlx shadcn@latest add https://caliperui.site/r/page-parts.jsonOverview
How the product is doing this month.
- Visits18,2408.2%up, good vs previous period
- Sign-ups6124.1%up, good vs previous period
- Conversion3.4%0.3%down, worse vs previous period
- Revenue$42.1k11.6%up, good vs previous period
| Point | Visits | Sign-ups | Event |
|---|---|---|---|
| Oct 8 | 947 | 71 | |
| Oct 9 | 1115 | 79 | |
| Oct 10 | 1057 | 83 | |
| Oct 11 | 1147 | 77 | |
| Oct 12 | 1067 | 87 | |
| Oct 13 | 1132 | 91 | |
| Oct 14 | 1249 | 93 | |
| Oct 15 | 1318 | 99 | |
| Oct 16 | 1253 | 91 | |
| Oct 17 | 1316 | 93 | |
| Oct 18 | 1420 | 95 | |
| Oct 19 | 1422 | 102 | |
| Oct 20 | 1453 | 108 | |
| Oct 21 | 1576 | 117 |
When to use #
Use it for
- Building common application pages quickly.
Skip it when
- You need a custom layout.
Installation #
pnpm dlx shadcn@latest add https://caliperui.site/r/page-parts.json
Adds its 11 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 DashboardLayout, ForgotPassword, VerifyEmail, WaitlistPage, StatusPage, OnboardingWizard, TeamGrid and JobBoard.
import { useState } from "react" import { Button } from "@/components/ui/button" import { DashboardLayout } from "@/components/ui/page-parts" import { LineChart } from "@/components/ui/line-chart" import { MetricsDashboard } from "@/components/ui/metrics-dashboard" const rng = (seed: number) => { let s = seed; return () => ((s = (s * 1664525 + 1013904223) % 4294967296) / 4294967296); }; export function PagePartsDemo() { const [range, setRange] = useState("30d"); const r = rng(3); const data = Array.from({ length: 14 }, (_, i) => ({ id: `d${i}`, label: `Oct ${i + 8}`, values: { visits: Math.round(900 + i * 40 + r() * 200), signups: Math.round(60 + i * 3 + r() * 20) } })); const spark = (n: number) => Array.from({ length: 12 }, (_, i) => n * (0.8 + i * 0.02 + r() * 0.1)); return ( <DashboardLayout title="Overview" description="How the product is doing this month." actions={<Button size="sm">Export</Button>} kpis={<MetricsDashboard range={range} onRangeChange={setRange} metrics={[{ id: "a", label: "Visits", value: "18,240", delta: 8.2, series: spark(100) }, { id: "b", label: "Sign-ups", value: "612", delta: 4.1, series: spark(100) }, { id: "c", label: "Conversion", value: "3.4%", delta: -0.3, series: spark(100) }, { id: "d", label: "Revenue", value: "$42.1k", delta: 11.6, series: spark(100) }]} />} main={<LineChart label="Visits and sign-ups" data={data} series={[{ id: "visits", label: "Visits" }, { id: "signups", label: "Sign-ups" }]} />} aside={<><div className="grid gap-2 rounded-xl border border-border p-4"><h4 className="text-sm font-semibold">Recent activity</h4><ul className="grid gap-2 text-sm text-muted-foreground"><li>Maya upgraded to Team</li><li>Ravi invited 3 people</li><li>A webhook was retried</li><li>Noor published a dashboard</li></ul></div></>} /> ); }
API reference #
DashboardLayout
component
ForgotPassword
component
VerifyEmail
component
WaitlistPage
component
StatusPage
component
OnboardingWizard
component
TeamGrid
component
JobBoard
component
Accessibility #
It exposes status, alert, img and group semantics, with aria-label, aria-hidden, aria-invalid, aria-current, aria-labelledby and aria-pressed kept in step with state. Changes that matter are announced through a live region.
No custom key handling; Tab and the native activation keys do the work.
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.