Choreo.Lab.Siren (Choreo v0.10.0)

Copy Markdown View Source

A custom Kino widget for rendering Mermaid diagrams with pan, zoom, and height control.

Experimental module

This module is experimental and its API is subject to change.

Summary

Functions

Creates a new Kino widget displaying the given Mermaid diagram.

Types

t()

@type t() :: Kino.JS.t()

Functions

new(mermaid_code, opts \\ [])

@spec new(
  String.t(),
  keyword()
) :: t()

Creates a new Kino widget displaying the given Mermaid diagram.

Options

  • :height - The height of the widget container (e.g., "400px", "600px", 500). Defaults to "400px".
  • :theme - The Mermaid theme to use (e.g., "default", "dark", "forest", "neutral"). If not set, it will auto-detect based on the environment's background brightness.