sigilUI

Mermaid Diagram

Render a diagram from Mermaid text syntax.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { MermaidDiagram } from "@sigil-ui/components";

Usage

<MermaidDiagram
    chart={`graph LR
      A[Tokens] --> B[CSS]
      B --> C[Components]
      C --> D[App]`}
  />

Props

PropTypeDefaultDescription
chart (required)string—Chart configuration.
theme"dark" | "default"—Theme configuration.

Token integration

CSS VariablePurpose
--s-primaryPrimary
--s-textText
--s-border-strongBorder strong
--s-chart-axisChart axis
--s-surfaceSurface
--s-surface-elevatedSurface elevated
--s-chart-gridChart grid
--s-radius-cardRadius card
--s-borderBorder
--s-backgroundBackground
--s-errorError
--s-text-mutedText muted