Duskmoon UI v10.0.11
Theme
Markdown Body dm_markdown_body
## Overview Server-rendered Markdown powered by MDEx. GitHub Flavored Markdown, color chips, front matter, hard line breaks, and Mermaid diagrams are enabled by default. ## Usage ```heex <.dm_markdown_body source={"# Hello\n\nThis is **Markdown**."} /> ``` Pass MDEx document settings through `options`, or replace the default plugin list through `plugins`. ## Front matter and color chips Front matter delimited by `---` renders visibly as a labeled YAML code block. Three-, four-, six-, and eight-digit hexadecimal colors plus RGB and HSL colors render with color chips when written as inline code. ````markdown --- title: DmMarkdown feature showcase tags: - rust - yew accent: '#4C86FC' --- # DmMarkdown rendering Dm Markdown renders source text into the same typography scope as `MarkdownBody`, with labeled fenced code and Mermaid diagrams. ## Inline color chips | Color | Inline code | | --- | --- | | Brand blue | `#4C86FC` | | White | `#fff` | | Black | `#000` | | Transparent red | `#FF000080` | Function colors work too: `rgb(...)`, `rgba(...)`, `hsl(...)`, `hsla(...)`. ```` ## Hard line breaks `hardbreaks: true` is the default and converts soft line breaks to `<br>`. Set it to `false` to preserve CommonMark soft line breaks. ```heex <.dm_markdown_body source={"First line\nSecond line"} options={[render: [hardbreaks: true]]} /> <.dm_markdown_body source={"First line\nSecond line"} options={[render: [hardbreaks: false]]} /> ```

Front matter and color chips

The rendered result shows the YAML front matter and adds chips for each supported color value.

YAML
title: DmMarkdown feature showcase
tags:
  - rust
  - yew
accent: '#4C86FC'

DmMarkdown rendering

Dm Markdown renders source text into the same typography scope as MarkdownBody, with labeled fenced code and Mermaid diagrams.

Inline color chips

Color Inline code
Brand blue #4C86FC
White #fff
Black #000
Transparent red #FF000080

Function colors work too: rgb(...), rgba(...), hsl(...), hsla(...).

Hard line breaks

Enabled (default)

render: [hardbreaks: true]

First line
Second line

Disabled

render: [hardbreaks: false]

First line Second line