# mermaid2react

> mermaid2react

Latest version **0.1.4** (published 2021-01-10) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install mermaid2react
pnpm add mermaid2react
yarn add mermaid2react
bun add mermaid2react
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2021-01-10 |
| First published | 2021-01-09 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dan Lynch |
| Maintainers | pyramation |

## Links

- npm: https://www.npmjs.com/package/mermaid2react
- Repository: https://github.com/pyramation/mermaid2react
- Homepage: https://github.com/pyramation/mermaid2react#readme
- Issues: https://github.com/pyramation/mermaid2react/issues
- npm.io page: https://npm.io/package/mermaid2react

## Dependencies (6)

- [react](https://npm.io/package/react.md) ^17.0.1
- [mermaid](https://npm.io/package/mermaid.md) ^8.8.4
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.0
- [styled-system](https://npm.io/package/styled-system.md) ^5.1.5
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.11.2
- [styled-components](https://npm.io/package/styled-components.md) ^5.0.1

## Recent versions

- 0.1.4 (latest) — 2021-01-10
- 0.1.3 — 2021-01-10
- 0.1.2 — 2021-01-10
- 0.1.1 — 2021-01-10
- 0.1.0 — 2021-01-10
- 0.0.5 — 2021-01-09
- 0.0.4 — 2021-01-09
- 0.0.3 — 2021-01-09
- 0.0.2 — 2021-01-09
- 0.0.1 — 2021-01-09

## README

# mermaid2react

```sh
npm install mermaid2react
```

For SSR and backend rendering, it's not necessary to load mermaid js. Additionally, webpack and friends can create issues when importing the library into your package.

Hence, this repo was born, which uses `load-script` to dynamically load mermaid from a CDN.

## Usage 

```js
import { Mermaid } from 'mermaid2react';

export const YourComponent = () => {
    return (
        <Mermaid chart={`
graph TD
    A[AuthOneTimeToken] -->|password| B(Verify)
    B --> C{matches?}
    C -->|yes| D[return token]
    C -->|no| E[return false]
        `} />
    );
}
```

---
_Source: https://npm.io/package/mermaid2react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
