# Fan Layout

> One source fanning out to 2–10 targets with automatic 2-column grid switching above 6 targets.

Use `fan` when one agent, gateway, or router dispatches work to many backends, models, or plugins.

## Live Interactive Example

Notice how 8 targets automatically switch to a clean 2-column grid with animated fan-out brackets:

```diagram
type: fan
label: "One agent runs its tools across any of eight isolated sandbox backends."
eyebrow: Execution Backends
source:
  title: Agent
  note: "tools_run_on= picks backend"
  description: "Switch execution environments with a single parameter without changing tool code."
targets_eyebrow: Backends
targets:
  - { title: docker, highlight: true, description: "Local container isolation with zero cloud cost." }
  - { title: subprocess, description: "Direct local execution for trusted dev runs." }
  - { title: sandlock, description: "Lightweight OS-level filesystem and network sandbox." }
  - { title: ssh, description: "Remote Linux or GPU workstation execution." }
  - { title: e2b, description: "Managed cloud microVM sandboxes." }
  - { title: modal, description: "Serverless cloud containers with GPU bursts." }
  - { title: daytona, description: "Persistent cloud dev workspaces." }
  - { title: novita, description: "Cloud GPU sandbox provider." }
```

## Step-by-Step Guide

1. **Define `source`** on the left (`{ title, note, description }`).
2. **List 2–10 `targets`** on the right (plain strings or item objects with `highlight` / `description` / `code`).
3. **Add `eyebrow` and `targets_eyebrow`** to label the whole diagram and the target group.
4. **Highlight the default or recommended target** with `highlight: true`.

## YAML Source

```yaml
type: fan
label: "One agent runs its tools across any of eight isolated sandbox backends."
eyebrow: Execution Backends
source: { title: Agent, note: "tools_run_on= picks backend" }
targets_eyebrow: Backends
targets: [docker, subprocess, sandlock, ssh, e2b, modal, daytona, novita]
```

## Field Reference

| Field | Required | Description |
|---|---|---|
| `type` | Yes | Must be `fan` |
| `label` | Yes | Accessible 1-sentence summary |
| `source` | Yes | Left-side source card (string or item object) |
| `targets` | Yes | 2–10 right-side target items (auto 2-col above 6 items) |
| `targets_eyebrow` | No | Uppercase label above the targets card |

## Related pages

- [Flow Layout](https://diagram.praison.ai/docs/layouts/flow.md)
- [Map Layout](https://diagram.praison.ai/docs/layouts/map.md)
- [Stack Layout](https://diagram.praison.ai/docs/layouts/stack.md)
