<MermaidAdapter>
Renders a Mermaid chart. Inside a DiagramStepper, the nodes/edges listed in regionMap become regions revealed step by step; outside one, the whole chart is shown.
| Name | Type | Default | Description |
|---|---|---|---|
chart | string | — | Mermaid chart definition. |
regionMap? | Record<string, string> | — | Map Mermaid node/edge IDs to DiagramStepper region IDs. Unmapped elements stay visible. |
config? | Record<string, unknown> | — | Pass-through Mermaid configuration. |
className? | string | — | Class on the wrapping div. |
The chart is rendered again only when the content of chart, config or regionMap changes. Step changes just toggle region visibility, and inline objects are fine.
Static chart
Without a DiagramStepper the chart renders fully visible:
import { Slide } from '@react-slides/core'import { MermaidAdapter } from '@react-slides/plugin-mermaid'
const slides = () => { return ( <> <Slide> <MermaidAdapter chart={`graph LR\n A[Client] --> B[Server]`} /> </Slide> </> )}
export default slidesRegion IDs
For nodes, the Mermaid node identifier (e.g. A). For edges, the convention is <source>-<target> (e.g. A-B). Inspect the rendered SVG if you’re unsure.