MermaidDiagram

@Composable
fun MermaidDiagram(source: String, modifier: Modifier = Modifier, complete: Boolean = true)(source)

Renders Mermaid source as a diagram. By default with the bundled, offline mermaid.js inside a transparent WebView that sizes itself to the rendered SVG; provide another MermaidRenderer through LocalMermaidRenderer (e.g. NativeMermaidRenderer from ai-elements-mermaid-native) to draw it with Compose Canvas instead.

Mermaid is themed from the current Material color scheme. Tap to open a full-screen, pinch-zoomable viewer. Invalid syntax falls back to the source.

Parameters

complete

false while the fence is still streaming; shows a placeholder.