What are the steps to using mermaid?
The steps to using mermaid are as follows:
- There is only one option for the section.
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
If you install using npm, you can run the following command in the command line:
npm install mermaid --save
- Surrounding element
<div class="mermaid">
graph LR
A-->B
</div>
- Render mermaid charts: To render a mermaid chart in your HTML file, add the following JavaScript code.
mermaid.initialize({ startOnLoad: true });
This will automatically render the Mermaid chart when the page loads. You can also manually render the chart through other triggering events, such as when a button is clicked.
- a mythical creature with the upper body of a human and the tail of a fish
.mermaid {
width: 500px;
height: 500px;
}
This will allow you to set the width and height of the mermaid chart to 500 pixels.
The above are the basic steps for using Mermaid. You can find more detailed information about other types of charts and configuration options in Mermaid’s official documentation.