> For the complete documentation index, see [llms.txt](https://pele-animate.danielkimdev.com/llms.txt).

# Mermaid diagrams that explain themselves

Readers step through a Mermaid diagram, rendered by [Pele](https://pele.run), in the order you choose, with icons from a set of 4,000+.

[Get started](https://pele-animate.danielkimdev.com/docs/getting-started/) [GitHub](https://github.com/dkdev24/pele-animate)

Click the diagram, or focus it and press Enter, to step through it.

diagram.md

```
flowchart LR  %% pa: 1=M 2=M>O 3=O>I 4=I>R  M@{ icon: "file-code", form: "square", h: 88, label: "Mermaid code" }  O@{ icon: "list-numbers", form: "square", h: 88, label: "Ordered steps" }  I@{ icon: "palette", form: "square", h: 88, label: "Illustrated scene" }  R@{ icon: "player-play", form: "square", h: 88, label: "Reader follows along" }  M -->|pin the order| O  O -->|add icons| I  I -->|click through| R
```

## You set the order

Pin steps with one comment line, `%% pa: 1=M 2=M>O 3=O>I 4=I>R`. Without it, the order follows the edges. [Step order](https://pele-animate.danielkimdev.com/docs/step-order/)

## Readers step through it

Previous, play and next buttons, plus Space and the arrow keys. The finished picture is the resting state. [How it works](https://pele-animate.danielkimdev.com/docs/how-it-works/)

## Icons from a big set

4,368 line icons in 36 categories, loaded only for the categories you import, with adjustable stroke width. [Icons](https://pele-animate.danielkimdev.com/docs/icons/)

## Install

```
npm i pele-animate pele
pnpm add pele-animate pele
yarn add pele-animate pele
bun add pele-animate pele
```

Then [render your first diagram](https://pele-animate.danielkimdev.com/docs/getting-started/). It runs in the browser, so it works in Vite, Astro, SvelteKit, Nuxt and plain HTML: see [recipes](https://pele-animate.danielkimdev.com/docs/recipes/).

## Same diagram, four ways

One three-step flow, written left to right, in panels too narrow for it. Mermaid keeps its layout and shrinks it until the text is hard to read. Pele lays it out again to fit, and pele-animate adds the steps: the last two loop on their own, and a click steps through them.

**Mermaid.js** fixed layout, scaled down

**Pele** layout adapts to the width

**pele-animate** with autoplay

**pele-animate** with autoplay and icons

## Where it fits

|  | Renders Mermaid | Layout | Adds step order and playback | Icons |
| --- | --- | --- | --- | --- |
| [Mermaid.js](https://mermaid.js.org) | Yes, all diagram types | Fixed; scaled down to fit, so text shrinks | No | None bundled; you register an icon pack such as Iconify |
| [Pele](https://pele.run) | Yes, small and synchronous | Adapts to the container width | No | Same: none built in, you plug in your own |
| **pele-animate** | Uses Pele | Adapts, as Pele does | Yes | 4,368 bundled, or your own |

pele-animate animates flowcharts, sequence diagrams, architecture, state, C4 context, block, class and ER diagrams, timelines, journeys, git graphs and Gantt charts. Layout, sizing and syntax stay Pele's. It is an unofficial add-on, not a theme package.

## For coding agents

The package ships a skill that wires pele-animate into a project and checks the result in a browser, and every docs page is available as Markdown ([llms.txt](https://pele-animate.danielkimdev.com/llms.txt), [llms-full.txt](https://pele-animate.danielkimdev.com/llms-full.txt)). See [For coding agents](https://pele-animate.danielkimdev.com/docs/agents/).

## FAQ

### What is pele-animate?

A small JavaScript post-processor that turns Mermaid diagrams into step-by-step animated scenes with icons. You write plain Mermaid; it adds step order, playback controls and icons on top of Pele's rendering.

### How do I make a diagram play automatically?

Add `autoplay` to the `%% pa:` comment. The intro draws in once the diagram is on screen, then step mode loops.

### Does it work with my framework?

Yes. It runs in the browser and mounts on the client, with recipes for Vite, Astro, SvelteKit, Nuxt and React.

### Is it free for commercial use?

Yes. pele-animate, Pele and the Tabler icon packs are all MIT licensed.

[Read the full FAQ](https://pele-animate.danielkimdev.com/docs/faq/)

<!-- generated by siteready agent-readiness -->
