Plan
A collapsible AI execution plan card built on Kinetic Button with spring height reveal, streaming title shimmer, spring progress bar, and staggered steps.
Customize
Installation
npx shadcn@latest add @kinetic/planUsage
Compose Plan, PlanHeader, PlanTitle, PlanDescription, PlanTrigger, PlanContent, PlanStep, and PlanFooter.
import {
Plan,
PlanContent,
PlanDescription,
PlanFooter,
PlanHeader,
PlanStep,
PlanTitle,
PlanTrigger,
} from "@/components/kinetic/ui/plan";
export function ReleasePlan() {
return (
<Plan defaultOpen>
<PlanHeader>
<PlanTitle>Prepare release bundle</PlanTitle>
<PlanDescription>Three steps before tagging a new registry snapshot.</PlanDescription>
<PlanTrigger />
</PlanHeader>
<PlanContent>
<PlanStep label="Audit registry dependencies" status="completed" />
<PlanStep label="Compile manifest payloads" status="in_progress" />
<PlanStep label="Run unit test suites" status="pending" />
</PlanContent>
<PlanFooter>
<span>1 of 3 steps completed</span>
</PlanFooter>
</Plan>
);
}Progress and streaming
When progress is omitted, Plan calculates completion automatically from the statuses of mounted PlanStep items and drives the top bar with a spring transform. Passing isStreaming enables a subtle WAAPI gradient sweep across PlanTitle and exposes a PlanAction slot alongside PlanTrigger.
import {
Plan,
PlanAction,
PlanContent,
PlanHeader,
PlanStep,
type PlanStepStatus,
PlanTitle,
PlanTrigger,
} from "@/components/kinetic/ui/plan";
interface LivePlanItem {
readonly id: string;
readonly label: string;
readonly status: PlanStepStatus;
}
interface LivePlanCardProps {
readonly streaming: boolean;
readonly steps: readonly LivePlanItem[];
}
export function LivePlanCard({ streaming, steps }: LivePlanCardProps) {
return (
<Plan isStreaming={streaming} defaultOpen>
<PlanHeader>
<PlanTitle>Executing workspace checks</PlanTitle>
<PlanAction>
<PlanTrigger />
</PlanAction>
</PlanHeader>
<PlanContent>
{steps.map((step) => (
<PlanStep key={step.id} label={step.label} status={step.status} />
))}
</PlanContent>
</Plan>
);
}Motion preferences
Plan defaults to speed={0.45}, blurPx={8}, and staggerMs={95}. Opening staggers visible PlanStep rows via staggerReveal, draws checkmarks on completed steps via drawStroke, and highlights in_progress indicators. Reduced motion settles height, progress, shimmer, and step states immediately.
API Reference
Plan
Zero-dependency collapsible plan card with spring progress bar, WAAPI title shimmer, and shared motion controls.
| Prop | Type | Default | Description |
|---|---|---|---|
open / defaultOpen / onOpenChange | boolean / boolean / (open: boolean) => void | true | Controlled or initial expanded state. |
isStreaming / progress / showProgress | boolean / number / boolean | false / auto / true | Activates WAAPI gradient sweep on PlanTitle, overrides computed progress, or toggles the progress bar. |
animated / speed / blurPx / staggerMs | boolean / number / number / number | true / 0.45 / 8 / 95 | Enables animations, scales spring/WAAPI timing, sets initial blur (px), and configures step stagger (ms). |
keepMounted / disabled | boolean / boolean | false / false | Retains collapsed DOM nodes or locks trigger toggling. |
PlanHeader / PlanTitle / PlanDescription / PlanAction / PlanTrigger / PlanContent / PlanFooter
Kinetic Button trigger with rotating chevron, height-animated PlanContent via useAnimatedSize, and shimmering PlanTitle.
| Prop | Type | Default | Description |
|---|---|---|---|
isStreaming (PlanTitle) | boolean | - | Title-level override for the WAAPI streaming gradient sweep. |
asChild (PlanTrigger) | boolean | false | Delegates trigger rendering to a custom child element. |
keepMounted / forceMount (PlanContent) | boolean / boolean | false | Keeps step elements mounted while closed. |
PlanStep
Staggered plan row with drawStroke checkmark on completion and subtle active indicator while in_progress.
| Prop | Type | Default | Description |
|---|---|---|---|
status | "pending" | "in_progress" | "completed" | "pending" | Drives stroke-draw checkmark, active indicator, or pending ring styling. |
label / description / icon | React.ReactNode / React.ReactNode / React.ReactNode | - | Step title, optional detail line, and custom indicator node. |