components/markdown
Display · 33 / 64

Markdown

ui.widgets.Markdown

Renders a supported Markdown subset as native nodes.

BEHAVIOR CONTRACT

Headings, emphasis, inline code, lists and quotes become real layout text nodes.

RECORDED INTERACTION

Shows headings, bold, italic, lists and quotes.

examples/storybook/stories.zig:2871
// ── Markdown ──
pub fn buildMarkdown(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    _ = scope;
    const md =
        \\# Markdown
        \\
        \\Supports **bold**, *italic*, and `inline code`.
        \\
        \\- bullet one
        \\- bullet two
        \\
        \\> A blockquote line.
    ;
    const res = try W.Markdown(md, .{ .base_font_size = 13 }).render(cx);
    return res.root;
}
View source on GitHubexamples/storybook/stories.zig:2871

The story's verbatim source from the Storybook (zenit 4c50245 2026-10-01). W is ui.widgets; col / row / label are small Storybook layout helpers.

zenit · Dual-licensedFree for open-source projects under GPL-3.0-only; closed-source or commercial products need a commercial license.Contact the author: zongyi.xzy#gmail.com (replace # with @)zenit 4c50245 2026-10-01