mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-03 04:14:15 +01:00
25 lines
587 B
Markdown
25 lines
587 B
Markdown
# Layouts
|
|
|
|
This page lists the available layout algorithms supported in Mermaid diagrams.
|
|
|
|
## Supported Layouts
|
|
|
|
- **elk**: [ELK (Eclipse Layout Kernel)](https://www.eclipse.org/elk/)
|
|
- **tidy-tree**: Tidy tree layout for hierarchical diagrams [Tidy Tree Configuration](/config/tidy-tree)
|
|
- **cose-bilkent**: Cose Bilkent layout for force-directed graphs
|
|
- **dagre**: Dagre layout for layered graphs
|
|
|
|
## How to Use
|
|
|
|
You can specify the layout in your diagram's YAML config or initialization options. For example:
|
|
|
|
```mermaid
|
|
---
|
|
config:
|
|
layout: elk
|
|
---
|
|
graph TD;
|
|
A-->B;
|
|
B-->C;
|
|
```
|