Timelines are experimental. The syntax is stable except for icon integration.
Basic example
Syntax overview
Timelines start with thetimeline keyword, followed by an optional title and time periods with events:
Multiple events per period
You can add multiple events to a single time period:Example
Both time periods and events are simple text, not limited to numbers.
Sections and ages
Group time periods into sections using thesection keyword:
Text wrapping
Long text is automatically wrapped. You can also force line breaks with<br>:
Styling options
Individual time period styling (default)
By default, each time period has its own color scheme:Unified color scheme
Disable multi-color with thedisableMultiColor option:
Customizing colors
Theme variables
Theme variables
Customize colors using
cScale0 to cScale11 theme variables:Mermaid supports up to 12 sections with unique colors. After 12 sections, the color scheme repeats.