Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

Mermaid

Renders host-supplied Mermaid source as a labelled diagram with a local loading and error state.

MDX@gaudi/design-system/mdx/MermaidView in StorybookSource

Diagram colors and typography use Gaudi tokens and update when the surrounding theme or local tokens change. Wide diagrams keep readable labels and scroll within a keyboard-focusable figure.

Installation

pnpm add github:ahmadassaf/design-system

Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.

import Mermaid from '@gaudi/design-system/mdx/Mermaid';

Usage

<Mermaid  id='architecture-flow'  description='Draft moves to review before publication.'  chart={`flowchart TD  A[Draft] --> B[Review]`}/>

Examples

Playground

Storybook

Invalid Diagram

Storybook

API

4 props

Accessibility

Mermaid exposes the rendered diagram as one labelled figure. Provide a concise description that communicates the diagram meaning without relying on shape, position, or color.