Skip to content

jasonbellamy/react-mermaid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React <Mermaid>

A react component to display mermaid diagrams and flowcharts.

Getting Started

  • Install with NPM - npm install --save react-mermaid

Usage

var React   = require('react');
var Mermaid = require('react-mermaid');

var Component = React.createClass({
  render: function () {
    return (
      <Mermaid name="diagram">
        graph TD;
          A-->B;
          A-->C;
          B-->D;
          C-->D;
      </Mermaid>
    );
  }
});

Options

Property Type Argument Default Description
name string <optional> mermaid name of the diagram/flowchart

Developing

react-mermaid is built using ES6. Run the following task to compile the src/ into dist/.

npm run build

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

License

Copyright (c) 2015 Jason Bellamy
Licensed under the MIT license.

About

A react component to display mermaid diagrams and flowcharts

Resources

License

Stars

Watchers

Forks

Packages

No packages published