Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Plan
A collapsible card describing a plan of work.
Add a new button variant
Three steps, roughly 10 minutes
- Read the existing component implementation
- Add the new variant to the CVA config
- Document the variant and add a story
Draft plan
import {
Plan,
PlanAction,
PlanContent,
PlanDescription,
PlanFooter,
PlanHeader,
PlanTitle,
PlanTrigger,
} from "@/registry/default/shared/plan";
const steps = [
"Read the existing component implementation",
"Add the new variant to the CVA config",
"Document the variant and add a story",
];
export default function Particle() {
return (
<Plan className="w-full max-w-lg" defaultOpen>
<PlanHeader>
<PlanTitle>Add a new button variant</PlanTitle>
<PlanDescription>Three steps, roughly 10 minutes</PlanDescription>
<PlanAction>
<PlanTrigger />
</PlanAction>
</PlanHeader>
<PlanContent>
<ol className="list-inside list-decimal space-y-1 text-sm">
{steps.map((step) => (
<li key={step}>{step}</li>
))}
</ol>
</PlanContent>
<PlanFooter>
<span className="text-muted-foreground text-xs">Draft plan</span>
</PlanFooter>
</Plan>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/plan
Usage
import {
Plan,
PlanHeader,
PlanTitle,
PlanDescription,
PlanAction,
PlanContent,
PlanFooter,
PlanTrigger,
} from "@/components/plan";API Reference
| Export | Props |
|---|---|
Plan | Collapsible props, plus its own options |
PlanHeader | CardHeader props |
PlanTitle | CardTitle props, with some props omitted, plus its own options |
PlanDescription | CardDescription props, with some props omitted, plus its own options |
PlanAction | CardAction props |
PlanContent | CardContent props |
PlanFooter | <div> attributes |
PlanTrigger | CollapsibleTrigger props |
Open the source under Manual above for the exact prop types.
Examples
Working out a plan
Still gathering context
Reading the repository…
import {
Plan,
PlanContent,
PlanDescription,
PlanHeader,
PlanTitle,
} from "@/registry/default/shared/plan";
export default function Particle() {
return (
<Plan className="w-full max-w-lg" defaultOpen isStreaming>
<PlanHeader>
<PlanTitle>Working out a plan</PlanTitle>
<PlanDescription>Still gathering context</PlanDescription>
</PlanHeader>
<PlanContent>
<p className="text-sm">Reading the repository…</p>
</PlanContent>
</Plan>
);
}
On This Page