Walk readers through your Mermaid diagram, one step at a time.
Add a few lines of timeline after the diagram to decide what each step shows, hides or highlights. The diagram and its walkthrough live in one text document: paste it into the Playground and it plays.
Plays in your browser, with no package to install.
One document, for three people.
Whoever writes the walkthrough, whoever watches it, and whoever builds the player into a product all get the same .srn.
Writing it
Your diagram and walkthrough, in one text document.
Draw in Mermaid, order the steps with a timeline. It's all plain text: keep it next to your code, review and change it in Git.
Bank --> Done[Order placed] + Bank -.-> Retry[Retry payment] … + highlight Retry outlineLearn the timeline syntax
Watching it
Paste it in and play it at your own pace.
Whoever gets it pastes the text into the Playground, then steps forward, back and between routes. Nothing to install, no dev environment.
Building it in
An open-source engine for your own app.
siren-core draws the document as SVG; siren-board is a ready-made player with step buttons, autoplay and route switching. MIT licensed.
npm install siren-core siren-boardAPI docsOne line, one step. Four actions.
Each timeline line is a step: it names what moves on that step. List several on one line, separated by commas.
- Targets are the diagram's ids: a node is
Pay, an edge isCart-Pay - An element with an
enterstays hidden until that step - An id that doesn't exist is reported with its line
| Action | What it does | Example |
|---|---|---|
| enter | The element appears on this step: fade, or slide in from any side | enter Pay fade |
| exit | The element leaves on this step; its space is kept, so nothing else moves | exit Retry slide-left |
| highlight | Highlights the element: outline thickens its border, glow lights it up | highlight Bank glow |
| unhighlight | Takes the highlight off | unhighlight Bank |
One diagram, different routes.
Name your timelines: one for a payment that goes through, one for a retry. The diagram is drawn once; readers pick a route in the player.
timeline success: … exit Retry fade, exit Bank-Retry fade, highlight Done outline, unhighlight Banktimeline retry: … exit Done fade, exit Bank-Done fade, highlight Retry outline, unhighlight Bank
flowchart sequenceDiagram classDiagram
stateDiagram erDiagram gantt
Six common Mermaid diagrams
Keep the diagram you have. Syntax Siren doesn't support yet is reported with its line, never drawn wrong.
--siren-node-fill: #f3efff;
--siren-highlight-color: #0d9488;
Restyle it with CSS
Colours, lines and type are all --siren-* design tokens: override them in your own CSS for your own theme.
~/.claude/skills/siren/SKILL.md
Let AI write it
Install Siren's agent skill and AI agents such as Claude Code draw the diagram, script the timeline, and check on their own that it renders.
Writing Siren with AI