# Subagent bud

Subagents that bud: each new one swells out of the end of its branch in the lead agent's tree while the branch draws.

Also called: subagent animation.

> chatcn Pro: needs a Pro license (https://chatcn.dev/pro). Install from the `@chatcn-pro` registry with your license token; setup at https://chatcn.dev/docs/chatcn-pro.

Example: Subagents that bud. The lead agent hands work off: each subagent buds out of the lead's card and drops into the tree as its branch draws. Preview: https://chatcn.dev/preview/subagent-bud-demo

When the lead agent hands work off, the new subagent buds out of the tree: its branch draws off the spine, the card swells out of the end of it into place, and the lead's card gives a small squeeze as it lets go. Subagents that move because a sibling arrived glide to their new place. Every card carries a run check, so the tree reads as one run at a glance.

## Installation

```bash
npx shadcn@latest add @chatcn-pro/subagent-bud
```

## Usage

```tsx
import { SubagentBud } from "@/components/ui/chatcn/pro/subagent-bud"

<SubagentBud parent={{ id: "lead", title, status, detail }} agents={subagents} />
```

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `parent` | `{ id, title, detail?, status }` | The lead agent |
| `agents` | `{ id, title, detail?, status }[]` | In spawn order; a new id buds |

## Accessibility

- Each card is text with its run check named for its status.

## Motion

- The bud scales from a sliver at its branch (480 ms); the elbow draws with `stroke-dashoffset`; the spine eases to its new length.
- Reduced motion: cards appear in place.

Source: https://chatcn.dev/docs/components/subagent-bud