DocsComponentsTemplatesThemesGitHub

AgentPlan

Task plan with progress bar and step timeline that updates as the agent works.

Code

import * as React from 'react';
import { AgentPlan } from '@fruit-labs/design';

export default function Demo() {
  return (
    <div
      style={{
        maxWidth: 440,
      }}
    >
      <AgentPlan
        title="Refactor billing module"
        steps={[
          {
            title: 'Read existing code',
            status: 'done',
            time: '12s',
          },
          {
            title: 'Write migration',
            status: 'done',
            time: '48s',
          },
          {
            title: 'Run test suite',
            status: 'running',
            description: '214 tests',
          },
          {
            title: 'Open pull request',
            status: 'pending',
          },
        ]}
      />
    </div>
  );
}

Install

From npm:

npm install @fruit-labs/design

import { AgentPlan } from '@fruit-labs/design';

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/agent-plan.json

Guidelines

  • Update step status live; keep step titles as short imperatives.

Props

PropTypeRequired
titleReact.ReactNodeNo
stepsArray<{ title: React.ReactNode; description?: React.ReactNode; time?: string; status?: 'done' | 'running' | 'pending' | 'error' }>Yes
classNamestringNo

Edit this example on GitHub