collab/mermaid/packages/tiny/README.mdblame
View source
6dd74de1# Tiny Mermaid
6dd74de2
6dd74de3This is a tiny version of mermaid that is optimized for the web. It is a subset of the mermaid library and is designed to be used in the browser via CDN.
6dd74de4
6dd74de5## Lazy loading
6dd74de6
6dd74de7The original mermaid library supports lazy loading, so it will be faster on the initial load, and only load the required diagrams.
6dd74de8This is not supported in the tiny mermaid library. So it's always recommended to use the full mermaid library unless you have a very specific reason to reduce the bundle size.
6dd74de9
6dd74de10## Removals from mermaid
6dd74de11
6dd74de12This does not support
6dd74de13
6dd74de14- Mindmap Diagram
6dd74de15- Architecture Diagram
6dd74de16- Katex rendering
6dd74de17- Lazy loading
6dd74de18
6dd74de19## Usage via NPM
6dd74de20
6dd74de21This package is not meant to be installed directly from npm. It is designed to be used via CDN.
6dd74de22If you need to use mermaid in your project, please install the full [`mermaid` package](https://www.npmjs.com/package/mermaid) instead.
6dd74de23
6dd74de24## Usage via CDN
6dd74de25
6dd74de26```html
6dd74de27<!-- Format -->
6dd74de28<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@<MERMAID_MAJOR_VERSION>/dist/mermaid.tiny.js"></script>
6dd74de29
6dd74de30<!-- Pinning major version -->
6dd74de31<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@11/dist/mermaid.tiny.js"></script>
6dd74de32
6dd74de33<!-- Pinning specific version -->
6dd74de34<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@11.6.0/dist/mermaid.tiny.js"></script>
6dd74de35```