CheckpointTimeline
neon-ui/checkpoint-timelineFreeComponent
Checkpoint history rail with git sha, snapshot indicator, project id, restore with busy state, and empty state.
Install it
npx shadcn@latest add https://ui.neon.com/r/checkpoint-timeline.jsonSource
1"use client";23import type { ComponentProps, ReactNode } from "react";45import { EmptyState } from "@/components/empty-state/empty-state";6import { Button } from "@/components/ui/button";7import { cn } from "@/lib/utils";89export interface Checkpoint {10 /** Stable id the restore action reports. */11 id: string;12 /** Human label, e.g. "Added billing page". */13 label: string;14 /** Display-ready timestamp, e.g. "2m ago". */15 createdAt: string;16 /** Short git sha, e.g. "f39ac2d". */17 sha?: string;18 /** Whether a database snapshot rides with this checkpoint. */19 snapshot?: boolean;20 /** Tenant Neon project id, e.g. "damp-forest-123456". */21 projectId?: string;22}2324export type CheckpointTimelineProps = Omit<25 ComponentProps<"div">,26 "children"27> & {28 /** Newest first — the top row reads as "now". */29 checkpoints: Checkpoint[];30 /** Renders the restore action on every row. */31 onRestore?: (id: string) => void;32 /** The checkpoint currently restoring; locks every other action. */33 restoringId?: string | null;34 /** Override the built-in empty state. */35 empty?: ReactNode;36};3738/* ─────────────────────────────────────────────────────────39 * TIMELINE STORYBOARD40 *41 * entrance rows rise 8px one at a time, 60ms apart —42 * history introduces itself newest first43 * rest one continuous hairline rail threads square44 * markers (the StatusBadge vocabulary); the45 * newest holds primary and wears a mono46 * "current" tag, the past stays muted; each row47 * speaks twice — label + timestamp, then one48 * quiet mono line: sha · ■ snapshot · project49 * engage hovering or focusing a row wakes its restore50 * action — it slides out from behind the row51 * (8px, 200ms ease-out) as it fades in; the52 * space is always reserved, the row itself53 * never moves54 * restore the acting row holds: its marker breathes55 * primary and the action shimmers "Restoring…";56 * the rest of history recedes to half voice57 * until the flight lands58 * empty EmptyState holds the space — history hasn't59 * started, it isn't missing60// … truncated
What it pulls in
Other registry items
Files it writes
More from neon-ui
All 77 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| ActivityFeedactivity-feed | neon-ui | Components | Free | 2 deps | |
| AgentChatagent-chat | neon-ui | Components | Free | 6 deps | |
| AnimatedWashanimated-wash | neon-ui | Components | Free | no deps · 2 files | |
| ApiKeyListapi-key-list | neon-ui | Components | Free | 2 deps | |
| AppCardapp-card | neon-ui | Components | Free | 2 deps | |
| AppCreatorapp-creator | neon-ui | Components | Free | 2 deps | |
| AuthFormauth-form | neon-ui | Components | Free | no deps | |
| AutoscaleChartautoscale-chart | neon-ui | Components | Free | 1 dep |
