For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.1/en/components/markdown-surface.md.

Markdown Surface

Provides a coherent reading hierarchy for sanitized Markdown output, code, tables, media, and explicit custom-renderer slots.

Live preview

Run summary

The task completed with three verified changes.

npm run release:check
Review generated output before publishing.

Usage

<article class="markdown-surface">
  <h2>Run summary</h2><p>The task completed with <strong>three verified changes</strong>.</p><pre tabindex="0"><code>npm run release:check</code></pre><blockquote>Review generated output before publishing.</blockquote>
</article>

Contract

SurfaceValue
Root selector.markdown-surface
Native root<article>
Statesready, loading, empty, error
Events—
Methods—

Product boundary

It does not parse untrusted HTML, load remote renderers, or decide whether links are safe. Diagram, math, and media slots are registered explicitly by the host.

The component publishes a reusable interaction boundary only. Data fetching, persistence, permission, trusted content, and business entities remain host-owned.

Accessibility

Heading levels stay continuous, links are visible and focusable, and code remains left-to-right. Tables and code own bounded overflow on narrow screens.