Function aquamarine_demo_crate::example_with_styling[][src]

pub fn example_with_styling()
Expand description

You can apply custom themes on per-diagram basis using the %%init%% annotation

%%{init: { 'theme': 'base', 'themeVariables': { 'primaryColor': '#ffcccc', 'edgeLabelBackground':'#ccccff', 'tertiaryColor': '#fff0f0' }}}%% graph TD A(Diagram needs to be drawn) --> B{Does it have 'init' annotation?} B -->|No| C(Apply default theme) B -->|Yes| D(Apply customized theme)

To learn more, see the Theming Section of the mermaid.js book