MermaidRenderer

@Stable
interface MermaidRenderer(source)

Draws Mermaid source for MermaidDiagram, which supplies the card, the streaming placeholder and the full-screen viewer around it.

The default, MermaidRenderer.WebView, runs the bundled mermaid.js. The optional ai-elements-mermaid-native artifact adds NativeMermaidRenderer (Compose Canvas, no WebView). Provide one with LocalMermaidRenderer.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
@Composable
abstract fun Diagram(code: String, fullScreen: Boolean, modifier: Modifier, onClick: () -> Unit?)