# Code Output

A command and its output, streaming while it runs, then a settled mark.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/code-output
```

## Usage

```tsx
import { CodeOutput } from '@fetaui/components/code-output'

export function Example() {
  return <CodeOutput state="running" command="pnpm dev" duration="2.1s" lines={lines} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| state | running, done, failed | required |
| command | string | required |
| duration | string |  |
| lines | string[] | [] |
| footer | ReactNode |  |
| animated | boolean | true |

## When to use

- For commands and tool runs, including inside Trace.

## When not to use

- For snippets people copy: use Code Block.

## Accessibility

- The body is a log and sets aria-busy while running.

## Motion

- Lines rise 4 px and stagger by 40 ms.
- The mark scales from 0.6 in 240 ms. Failed tints the card.
- With reduced motion, lines appear at once. The spinner slows: it shows status.
