Plan
The steps an agent plans to take, and how far it has got.
Partly measured from the AI Elements Plan, closed and open. The 14px radius and the header grid are measured. Step indicators use Geist's Checkbox.
import { Plan } from "@replicas/ui";
export default function PlanDemo() {
return (
<Plan.Root defaultOpen status="running" style={{ width: "100%", maxWidth: 420 }}>
<Plan.Trigger description="2 of 5 done">Add dark mode</Plan.Trigger>
<Plan.Content>
<Plan.Description>
Store the theme in a cookie so the server renders the right one and the page doesn't flash on load.
</Plan.Description>
<Plan.Steps>
<Plan.Step status="done">Add a dark variant to the theme tokens</Plan.Step>
<Plan.Step status="done">Read the theme from a cookie on the server</Plan.Step>
<Plan.Step status="running">Add a toggle to the settings page</Plan.Step>
<Plan.Step>Check contrast on the charts</Plan.Step>
<Plan.Step>Update the screenshots</Plan.Step>
</Plan.Steps>
</Plan.Content>
</Plan.Root>
);
}Prompt
Copy Prompt hands your agent everything it needs to build the Plan in the Geist style: the measured tokens, the CSS and the structure.
Show Prompt
# Geist Plan
The steps an agent plans to take, and how far it has got.
Build a Plan in this project that looks and behaves like Geist's. Measured from the running Geist app (vercel.com/geist). Keep every value exact. Map the tokens onto the project's own theme variables instead of hard-coding them. Use the project's own component library for behaviour, or Base UI primitives if it has none.
Fidelity: Partly measured from the AI Elements Plan, closed and open. The 14px radius and the header grid are measured. Step indicators use Geist's Checkbox.
## Tokens
| Token | Light | Dark |
| --- | --- | --- |
| `--ds-background-100` | `hsl(0 0% 100%)` | `hsl(0 0% 4%)` |
| `--ds-gray-700` | `hsl(0 0% 56%)` | `hsl(0 0% 56%)` |
| `--ds-gray-900` | `hsl(0 0% 30%)` | `hsl(0 0% 63%)` |
| `--ds-gray-1000` | `hsl(0 0% 9%)` | `hsl(0 0% 93%)` |
| `--ds-gray-alpha-200` | `#00000014` | `#ffffff17` |
| `--ds-gray-alpha-400` | `#00000014` | `#ffffff24` |
| `--ds-blue-100` | `oklch(97.32% 0.0141 251.56)` | `oklch(22.17% 0.069 259.89)` |
| `--ds-blue-700` | `oklch(57.61% 0.2508 258.23)` | `oklch(57.61% 0.2321 258.23)` |
| `--ds-red-100` | `oklch(96.5% 0.0223 13.09)` | `oklch(22.1% 0.0657 15.11)` |
| `--ds-red-800` | `oklch(58.19% 0.2482 25.15)` | `oklch(58.01% 0.227 25.12)` |
| `--ds-red-900` | `oklch(54.99% 0.232 25.29)` | `oklch(69.96% 0.2136 22.03)` |
| `--ds-focus-ring` | `0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-focus-color)` | `0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-focus-color)` |
| `--ds-shimmer-spread` | `40px` | `40px` |
| `--ease-in-out` | `cubic-bezier(0.4, 0, 0.2, 1)` | `cubic-bezier(0.4, 0, 0.2, 1)` |
| `--default-transition-duration` | `0.15s` | `0.15s` |
| `--duration-normal` | `0.2s` | `0.2s` |
| `--duration-shimmer` | `2s` | `2s` |
| `--font-size-small` | `0.875rem` | `0.875rem` |
| `--font-size-regular` | `1rem` | `1rem` |
| `--font-weight-medium` | `500` | `500` |
| `--font-weight-semibold` | `600` | `600` |
| `--radius-kbd` | `4px` | `4px` |
## CSS
Scoped under `[data-style="geist"]`; dark rules sit under `[data-theme="dark"]`. The `ui-*` classes and data attributes match the structure below.
```css
@keyframes geist-plan-shimmer {
from {
background-position: 100% 0, 0 0;
}
to {
background-position: 0% 0, 0 0;
}
}
[data-style="geist"] {
.ui-plan {
box-sizing: border-box;
display: flex;
flex-direction: column;
min-width: 0;
border: 1px solid var(--ds-gray-alpha-400);
border-radius: 14px;
background-color: var(--ds-background-100);
color: var(--ds-gray-1000);
font-family: inherit;
font-size: var(--font-size-small);
line-height: 20px;
}
.ui-plan-trigger {
box-sizing: border-box;
display: grid;
grid-template-columns: auto minmax(0, 1fr) 32px;
grid-template-rows: auto auto;
align-items: center;
column-gap: 0;
row-gap: 6px;
width: 100%;
margin: 0;
padding: 20px 20px 20px 24px;
border: none;
border-radius: 13px;
background-color: transparent;
color: var(--ds-gray-1000);
font: inherit;
text-align: start;
user-select: none;
cursor: pointer;
&:focus-visible {
outline: none;
box-shadow: var(--ds-focus-ring);
}
}
.ui-plan-icon {
display: flex;
grid-row: 1;
grid-column: 1;
margin-right: 8px;
color: var(--ds-gray-1000);
& svg {
width: 16px;
height: 16px;
}
}
.ui-plan-title {
grid-row: 1;
grid-column: 2;
min-width: 0;
overflow: hidden;
font-size: var(--font-size-regular);
font-weight: var(--font-weight-semibold);
line-height: 24px;
text-overflow: ellipsis;
white-space: nowrap;
}
.ui-plan-progress {
grid-row: 2;
grid-column: 1 / 3;
color: var(--ds-gray-900);
font-variant-numeric: tabular-nums;
}
.ui-plan-chevron {
box-sizing: border-box;
grid-row: 1 / 3;
grid-column: 3;
justify-self: end;
width: 32px;
height: 32px;
padding: 8px;
border-radius: 8px;
color: var(--ds-gray-1000);
rotate: 90deg;
transition:
rotate var(--default-transition-duration) var(--ease-in-out),
background-color var(--default-transition-duration) var(--ease-in-out);
[data-panel-open] > & {
rotate: -90deg;
}
}
@media (hover: hover) {
.ui-plan-trigger:hover .ui-plan-chevron {
background-color: var(--ds-gray-alpha-200);
}
}
.ui-plan[data-status="running"] .ui-plan-title {
background-image:
linear-gradient(
90deg,
transparent calc(50% - var(--ds-shimmer-spread)),
var(--ds-background-100),
transparent calc(50% + var(--ds-shimmer-spread))
),
linear-gradient(var(--ds-gray-1000), var(--ds-gray-1000));
background-size: 250% 100%, auto;
background-repeat: no-repeat, repeat;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: geist-plan-shimmer var(--duration-shimmer) linear infinite;
}
.ui-plan-content {
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 16px;
height: var(--collapsible-panel-height);
padding: 4px 24px 24px;
overflow: hidden;
transition:
height var(--duration-normal) var(--ease-in-out),
padding-block var(--duration-normal) var(--ease-in-out),
opacity var(--duration-normal) var(--ease-in-out);
&[data-starting-style],
&[data-ending-style] {
height: 0;
padding-block: 0;
opacity: 0;
}
}
.ui-plan-description {
margin: 0;
color: var(--ds-gray-900);
}
.ui-plan-steps {
display: flex;
flex-direction: column;
gap: 8px;
margin: 0;
padding: 0;
list-style: none;
}
.ui-plan-step {
display: flex;
align-items: flex-start;
gap: 10px;
min-width: 0;
color: var(--ds-gray-1000);
}
.ui-plan-step-indicator {
box-sizing: border-box;
display: flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
margin-top: 2px;
border-radius: var(--radius-kbd);
background-color: var(--ds-background-100);
box-shadow: inset 0 0 0 1px var(--ds-gray-700);
color: var(--ds-background-100);
transition:
background-color var(--duration-normal) var(--ease-in-out),
box-shadow var(--duration-normal) var(--ease-in-out);
& svg {
width: 16px;
height: 16px;
opacity: 0;
}
}
.ui-plan-step-label {
min-width: 0;
}
.ui-plan-step[data-status="done"] {
color: var(--ds-gray-900);
& .ui-plan-step-indicator {
background-color: var(--ds-gray-1000);
box-shadow: inset 0 0 0 1px var(--ds-gray-1000);
& svg {
opacity: 1;
}
}
}
.ui-plan-step[data-status="running"] {
& .ui-plan-step-indicator {
background-color: var(--ds-blue-100);
box-shadow: inset 0 0 0 1px var(--ds-blue-700);
}
& .ui-plan-step-label {
font-weight: var(--font-weight-medium);
}
}
.ui-plan-step:is([data-status="error"], [data-status="failed"]) {
& .ui-plan-step-indicator {
background-color: var(--ds-red-100);
box-shadow: inset 0 0 0 1px var(--ds-red-800);
}
& .ui-plan-step-label {
color: var(--ds-red-900);
}
}
@media (prefers-reduced-motion: reduce) {
.ui-plan-chevron,
.ui-plan-content,
.ui-plan-step-indicator {
transition: none;
}
.ui-plan[data-status="running"] .ui-plan-title {
animation: none;
background: none;
color: var(--ds-gray-1000);
}
}
}
```
## Structure
How Replicas assembles it on Base UI.
```tsx
import { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
import type { ComponentProps, ReactNode } from "react";
import { join } from "./utils";
type RootProps = Omit<BaseCollapsible.Root.Props, "className"> & {
className?: string;
status?: string;
};
function Root({ className, status, ...props }: RootProps) {
return <BaseCollapsible.Root className={join("ui-plan", className)} data-status={status} {...props} />;
}
type TriggerProps = Omit<BaseCollapsible.Trigger.Props, "className"> & {
className?: string;
icon?: ReactNode;
description?: ReactNode;
};
function Trigger({ className, icon, description, children, ...props }: TriggerProps) {
return (
<BaseCollapsible.Trigger className={join("ui-plan-trigger", className)} {...props}>
{icon ? <span className="ui-plan-icon" aria-hidden>{icon}</span> : null}
<span className="ui-plan-title">{children}</span>
{description ? <span className="ui-plan-progress">{description}</span> : null}
<svg className="ui-plan-chevron" viewBox="0 0 16 16" fill="none" aria-hidden>
<path d="M6 4l4 4-4 4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</BaseCollapsible.Trigger>
);
}
function Content({ className, ...props }: Omit<BaseCollapsible.Panel.Props, "className"> & { className?: string }) {
return <BaseCollapsible.Panel className={join("ui-plan-content", className)} {...props} />;
}
function Description({ className, ...props }: ComponentProps<"p">) {
return <p className={join("ui-plan-description", className)} {...props} />;
}
function Steps({ className, ...props }: ComponentProps<"ol">) {
return <ol className={join("ui-plan-steps", className)} {...props} />;
}
type StepProps = ComponentProps<"li"> & { status?: "pending" | "running" | "done" | "error" };
function Step({ className, status = "pending", children, ...props }: StepProps) {
return (
<li className={join("ui-plan-step", className)} data-status={status} {...props}>
<span className="ui-plan-step-indicator" aria-hidden>
<svg viewBox="0 0 16 16" fill="none">
<path d="M5 8.25l2 2 4-4.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</span>
<span className="ui-plan-step-label">{children}</span>
</li>
);
}
export const Plan = {
Root,
Trigger,
Content,
Description,
Steps,
Step,
};
```
## Example
```tsx
import { Plan } from "@replicas/ui";
export default function PlanDemo() {
return (
<Plan.Root defaultOpen status="running" style={{ width: "100%", maxWidth: 420 }}>
<Plan.Trigger description="2 of 5 done">Add dark mode</Plan.Trigger>
<Plan.Content>
<Plan.Description>
Store the theme in a cookie so the server renders the right one and the page doesn't flash on load.
</Plan.Description>
<Plan.Steps>
<Plan.Step status="done">Add a dark variant to the theme tokens</Plan.Step>
<Plan.Step status="done">Read the theme from a cookie on the server</Plan.Step>
<Plan.Step status="running">Add a toggle to the settings page</Plan.Step>
<Plan.Step>Check contrast on the charts</Plan.Step>
<Plan.Step>Update the screenshots</Plan.Step>
</Plan.Steps>
</Plan.Content>
</Plan.Root>
);
}
```
## Foundations
The rest of the Geist style, as a skill: https://replicas.raphaelsalaja.com/skills/geist/SKILL.md