ProvisioningStatus
Provisioning, waking, and error panel states with a live detail line.
ProvisioningStatus narrates the wait between “create app” and a running sandbox. One quiet stage, three acts: while provisioning or waking, the NeonLoader resolves out of grain above a headline and a shimmering mono detail line — feed detail from your API and each step crossfades in place. On error, the loader yields to the house error treatment (mono tag, foreground sentence) with a retry action. The frame and rhythm never change between states.
Provisioning your app
Install
npx shadcn@latest add https://ui.neon.com/r/provisioning-status.json
Usage
import { ProvisioningStatus } from "@/components/neon-ui/provisioning-status";
<ProvisioningStatus
state={app.state}
detail={app.provisioningStep}
onRetry={() => provision(app.id)}
/>;
Wiring to Neon
Provisioning is a Neon operation, so poll the project’s operations and map their status onto the panel:
import { createNeonClient } from "@/lib/neon-client";
const neon = createNeonClient(process.env.NEON_API_KEY);
const { data } = await neon.operations.list(projectId).page();
const pending = data?.items.find(
(operation) =>
operation.status === "running" || operation.status === "scheduling"
);
// state: pending ? "provisioning" : failed ? "error" : done
// detail: pending?.action, e.g. "create_compute" mapped to your own copy
failed, error, and cancelled all mean the panel shows error; start_compute on an existing project is the waking case. Turn operation.action into your own sentence rather than showing the raw action name, and swap detail as each operation completes so the line crossfades instead of jumping.
States
- Provisioning — loader + headline + shimmering detail. Swap
detailas your API reports progress (“Creating Neon project…” → “Provisioning database…”) and it crossfades in place. - Waking — identical staging with wake copy; the sandbox exists, it’s just cold.
- Error — mono
errortag with a foreground sentence, muted detail, and a retry action where the shimmer was.
Props
state?"provisioning" | "waking" | "error"
Lifecycle state the panel narrates.
"provisioning" | "waking" | "error""provisioning"title?string
Override the state's default headline.
stringdetail?string
Status detail line; swapping it crossfades in place.
stringonRetry?() => void
Renders the retry action in the error state.
() => voidretryLabel?string
Label for the retry action.
string"Try again"variant?"panel" | "bare"
panel draws the house surface; bare embeds in an already-bordered pane.
"panel" | "bare""panel"size?"sm" | "md" | "lg"
Vertical breathing room.
"sm" | "md" | "lg""md"footer?ReactNode
Extra content under the detail line, e.g. a cancel link.
ReactNodeAccessibility
- The detail line is
aria-live="polite", so step changes are announced without interrupting. - The error headline is
role="alert"; the loader is decorative here (the visible text carries the status). - Shimmer and crossfades are static under
prefers-reduced-motion.