A beautiful React application for creating and visualizing Mermaid diagrams with an interactive editor and real-time preview.
- Interactive Code Editor: Real-time editing of Mermaid diagram code
- Live Preview: Instant diagram rendering with error handling
- Template Library: Quick start with Flowchart, Sequence, Pie Chart, Gantt, and Class Diagram templates
- Zoom & Pan: Interactive diagram navigation with zoom controls
- Fullscreen Mode: Dedicated view for detailed diagram inspection
- Export Options: Copy code to clipboard and download diagrams as SVG
- Responsive Design: Works seamlessly on desktop and mobile devices
- Touch Support: Pan and pinch-to-zoom for mobile devices
- Node.js (version 16 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/sravanth-space/mermaid.git
cd mermaid
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
npm run build
This creates a dist
folder with the built application ready for deployment.
The application is automatically deployed to GitHub Pages at mermaid.sravanth.co.uk when changes are pushed to the main branch. The deployment workflow:
- Builds the React application using Vite
- Deploys the static files to GitHub Pages
- Uses the custom domain configured in the CNAME file
npm run preview
- Edit Code: Use the left panel to write or edit Mermaid diagram code
- Quick Start: Click any template button to load pre-built diagram examples
- Navigate: Use zoom controls to zoom in/out, reset view, or go fullscreen
- Export: Copy the code or download the diagram as SVG
- Mobile: Use touch gestures to pan and pinch-to-zoom on mobile devices
- React 18: Modern React with hooks
- Vite: Fast build tool and development server
- Tailwind CSS: Utility-first CSS framework
- Lucide React: Beautiful icon library
- Mermaid.js: Diagram generation library
- Flowcharts
- Sequence diagrams
- Pie charts
- Gantt charts
- Class diagrams
- And many more Mermaid diagram types
This project is licensed under the MIT License - see the LICENSE file for details.