Skip to main content

Plan

A collapsible AI execution plan card built on Kinetic Button with spring height reveal, streaming title shimmer, spring progress bar, and staggered steps.

Registry compilation plan
Steps advance with a spring progress bar and drawStroke checkmarks.
Validate export contracts (completed)
Matched AST exports and internal library dependencies.
Compile registry payloads (in progress)
Rewriting consumer import paths for distribution.
Publish catalog index (pending)
Updating llms.txt and the root registry manifest.
1 of 3 completed33%

Customize

Speed0.45
Blur reveal (px)8
Step stagger (ms)95

Installation

npx shadcn@latest add @kinetic/plan

Usage

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.

PropTypeDefaultDescription
open / defaultOpen / onOpenChangeboolean / boolean / (open: boolean) => voidtrueControlled or initial expanded state.
isStreaming / progress / showProgressboolean / number / booleanfalse / auto / trueActivates WAAPI gradient sweep on PlanTitle, overrides computed progress, or toggles the progress bar.
animated / speed / blurPx / staggerMsboolean / number / number / numbertrue / 0.45 / 8 / 95Enables animations, scales spring/WAAPI timing, sets initial blur (px), and configures step stagger (ms).
keepMounted / disabledboolean / booleanfalse / falseRetains 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.

PropTypeDefaultDescription
isStreaming (PlanTitle)boolean-Title-level override for the WAAPI streaming gradient sweep.
asChild (PlanTrigger)booleanfalseDelegates trigger rendering to a custom child element.
keepMounted / forceMount (PlanContent)boolean / booleanfalseKeeps step elements mounted while closed.

PlanStep

Staggered plan row with drawStroke checkmark on completion and subtle active indicator while in_progress.

PropTypeDefaultDescription
status"pending" | "in_progress" | "completed""pending"Drives stroke-draw checkmark, active indicator, or pending ring styling.
label / description / iconReact.ReactNode / React.ReactNode / React.ReactNode-Step title, optional detail line, and custom indicator node.

Notes

Pass progress={number} whenever your agent computes fractional progress on the backend, or omit it to derive completion directly from mounted PlanStep statuses.