Components
Display a plan title and summary with expand/collapse and an Approve action. State-driven (idle / pending). Self-contained port from 21st.dev Agent Elements without the Markdown dep — summary renders as plain prose.
npx shadcn@latest add https://21st.dev/r/21stdev/plan-toolLoading preview...
import { PlanTool } from "@/components/ui/plan-tool";
const plan = {
id: "plan-4",
title: "Expand tool docs",
summary:
"Drafting a fuller documentation plan with rationale, edge cases, and expected outcomes per section.\n\nThis update extends examples with realistic payloads, richer summaries, and clearer before/after intent so readers can copy patterns directly.",
};
export default function Demo() {
return (
<div className="flex items-center justify-center w-full min-h-screen bg-background p-8 overflow-hidden">
<div className="w-full max-w-md">
<PlanTool state="pending" plan={plan} />
</div>
</div>
);
}