Markdown
Renders a markdown string (a GFM subset, pipe tables included) as native widgets through the same text pipeline as every other component — deterministic layout, selectable text. source is required and must be one {binding}; the element takes no children. Links dispatch on-link with the URL as payload (bare URLs autolink), <details> blocks toggle through on-details plus a model-owned details-expanded flag list, and #123 references linkify through issue-link-base.
markdown

Markup
<markdown source="{release_notes}" on-link="open_link" issue-link-base="https://github.com/native-sdk/native/issues/"></markdown>Zig builder
The builder is the canvas.markdown module, parameterized over the app's Msg type; on_link pairs with Ui.linkMsg(.tag).
const Md = native_sdk.canvas.markdown.Markdown(Msg);
Md.view(ui, model.release_notes, .{
.on_link = Ui.linkMsg(.open_link),
.issue_link_base = "https://github.com/native-sdk/native/issues/",
})Attributes
| Attribute | Description |
|---|---|
source | markdown: one {binding} producing the markdown text (a []const u8 field or fn; arena fns work). Required. |
on-link | markdown: bare Msg tag dispatched on link press; its payload is the URL ([]const u8 variant). |
on-details | markdown: bare Msg tag dispatched on a <details> summary press; its payload is the block index (usize variant). |
details-expanded | markdown: {binding} naming a []const bool iterable of expanded flags, in details-block document order. |
issue-link-base | markdown: literal URL prefix or one {binding}; '#123' refs become links to base ++ number (ghissue:// or https://github.com/owner/repo/issues/). |
