Import from Mermaid

Paste Mermaid into the code panel and it offers a one-click Convert. The transpiler rewrites every Mermaid diagram type into this language, mapping each onto the closest family the canvas can render. Only a genuinely unknown header reports "not supported yet"; a bad line within a known type degrades to a diagnostic, never a thrown error.

Mermaid is an import format; Koboyo diagram code is the editing format. After converting, you edit and generate the result like anything else.

An example#

This Mermaid flowchart:

flowchart TD
  A[Start] --> B{Ready?}
  B -->|yes| C[Ship]
  B -->|no| D[Wait]
  D --> B

converts to Koboyo code that renders like this:

flowchart
Start [rectangle] -> Ready [diamond]
Ready -> Ship [rectangle]: yes
Ready -> Wait [rectangle]: no
Wait -> Ready
DiagramStartReadyShipWaityesno
The converted flowchart, drawn in the canvas style.

Every Mermaid type#

Mermaid typeFamilyNotes
flowchart / graphflowchartEvery legacy bracket shape and @{ shape: … } name, & fan-out, subgraph to group, all link styles, style/class/::: to colour, click to link, @{ icon } to icon.
swimlane-betabpmnEach top-level subgraph becomes a lane; cross-lane edges become handoffs.
sequenceDiagramsequenceparticipant … as, ->>/-->>/-x/-), +/- activations, loop/alt/opt/par/break/critical, notes.
classDiagramclassClasses to UML boxes with attribute and method compartments; <|-- / *-- / o-- / ..> to their UML arrowheads.
stateDiagram(-v2)statemachine[*] to start/end, composite state X { } to group, <<choice>> to diamond.
erDiagramerdCrow's-foot ||--o{ to 1:1 / 1:N / N:M; attributes to name type pk/fk.
journeyflowchartSections to groups, tasks chained, score to colour.
ganttflowchartSections to groups, after to edges, status to colour.
piechart (pie)Rows to label : value.
mindmapmindmapRoot to central, indentation to branches.
timelinemindmapTitle to central, sections to branches.
quadrantChartflowchartFour quadrant groups, points placed by [x, y].
requirementDiagramflowchartRequirements and elements to nodes, typed edges.
gitGraphflowchartCommits chained as circles; branch, merge, cherry-pick.
C4*architecturePerson to user icon, SystemDb to cylinder, Boundary to group.
xychart-betachartx-axis to categories, bar / line to series.
sankey-betaflowchartCSV src,target,value to weighted edges.
block-betaflowchartBlocks to nodes, block:id to group.
packet-betaflowchartByte fields to grouped nodes.
kanbanflowchartColumns to groups, items to sticky notes.
architecture-betaarchitectureGroups and services with icon or shape.
radar-betachart (radar)Axes to categories, curves to series.
treemap-betamindmapHierarchy to branches and children.
zenumlsequenceMessages mapped; control flow simplified.

Connectors are flipped#

Mermaid's connector semantics are the opposite of ours, and the transpiler accounts for it: solid --> becomes ->, dashed -.-> becomes -->, thick ==> becomes ->, and <--> / o--o / x--x become <->.

Preprocessing#

Common to all types: a leading --- … --- frontmatter block is read for its title: (the rest dropped), %%{ init … }%% directives are stripped, and %% starts a comment. Every input line maps to one output line, so diagnostics point at the converted text.

Every diagram on these pages is compiled live from the code above it, through the same pipeline the app uses. Open the canvas to try it.