ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop on the web portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
    Develop locally with the CLI
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
Concepts
Development
Policies
Handlers
API Keys
Rate Limiting
MCP Server
MCP Gateway
AI Gateway
Developer Portal
    IntroductionLocal DevelopmentUpdating VersionsNode Modules & Customization
    Configuration
    Writing
    OpenAPI
    Authentication
    Integrations
    Guides
    Extending
    Components
      General
      Documentation
        CodeTabsMermaidAPI PlaygroundSecretSidecar BoxStepperSyntax Highlight
      Form
      Utility
Monetization
Deploying & Source Control
Analytics
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsSecuritySupportTrust & ComplianceChangelog
powered by Zudoku
Documentation

Mermaid

The Mermaid component renders Mermaid diagrams in the browser using client-side rendering.


Build-Time Alternative

For static diagrams, consider build-time rendering with rehype-mermaid.

Prerequisites

Install the mermaid peer dependency:

TerminalCode
npm install mermaid

Import

Code
import { Mermaid } from "zudoku/mermaid";

Props

Code
type MermaidProps = { chart: string; // Mermaid diagram definition config?: MermaidConfig; // Optional Mermaid configuration } & ComponentProps<"div">;

Usage

Basic Usage

Code
<Mermaid chart={`graph TD; A-->B; A-->C; B-->D; C-->D;`} />

With Configuration

Code
<Mermaid config={{ theme: "dark" }} chart={`sequenceDiagram Alice->>Bob: Hello Bob Bob-->>Alice: Hi Alice`} />
Edit this page
Last modified on June 11, 2026
CodeTabsAPI Playground
On this page
  • Prerequisites
  • Import
  • Props
  • Usage
    • Basic Usage
    • With Configuration
React
TypeScript
React
React