Components

Mermaid

Flowcharts, sequence diagrams, and more from text.

Write diagrams as mermaid fenced code blocks or with the Mermaid component. Blocks render client-side; the raw definition stays in the markup for search indexing and no-JS fallbacks.

flowchart LR
  A[Start] --> B[Process]
  B --> C[End]

Component usage#

Minimal example
flowchart LR
A --> B

The diagram definition can also go in children:

flowchart TD
Top --> Bottom

See the Mermaid documentation for the full syntax: flowcharts, sequence diagrams, Gantt charts, and more.

Properties#

NameTypeDescription
chartstring

Diagram definition. Defaults to the string children.

titleReactNode

Optional caption above the diagram.

actionsboolean

Show zoom and reset controls.

Default: true
placement'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'

Corner for the controls. Fences accept placement="top-left" in the info string.

Default: 'bottom-right'
childrenReactNode

Diagram definition when chart is omitted.

Last updated on