Display rich prose, documentation runbooks, image galleries, and playable media inside any @aiui.page or declarative YAML page.
@aiui.page
| Python builder | YAML type | What it renders |
type
|---|---|---|
| aiui.text(content) | text | Plain paragraph text |
aiui.text(content)
text
| aiui.markdown_text(content) | markdown_text | Sanitized Markdown (tables, code blocks, links, lists) |
aiui.markdown_text(content)
markdown_text
| aiui.doc_viewer(content, *, title, toc=True) | doc_viewer | Full Markdown document reader with automatic Table of Contents |
aiui.doc_viewer(content, *, title, toc=True)
doc_viewer
| aiui.image_display(src, *, alt, caption, width) | image_display | Single responsive image with optional caption |
aiui.image_display(src, *, alt, caption, width)
image_display
| aiui.gallery(items) | gallery | Responsive thumbnail grid (src, alt, caption, optional click link) |
aiui.gallery(items)
gallery
src
alt
caption
| aiui.audio_player(src, *, autoplay=False, title) | audio_player | Built-in HTML5 audio player |
aiui.audio_player(src, *, autoplay=False, title)
audio_player
| aiui.video_player(src, *, autoplay=False, poster, title) | video_player | Built-in HTML5 video player with poster image |
aiui.video_player(src, *, autoplay=False, poster, title)
video_player
| aiui.html(content) / aiui.html_embed(content) | html / html_embed | Inline HTML snippet rendered in a constrained srcDoc frame |
aiui.html(content)
aiui.html_embed(content)
html
html_embed
srcDoc
| aiui.preview_frame(url, *, allowed_origins, title, height, viewport) | preview_frame | Origin-gated live URL preview frame for staging sites and local dev servers |
aiui.preview_frame(url, *, allowed_origins, title, height, viewport)
preview_frame
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML (Markdown file)">
</Tabs>
<Tip>
In YAML pages, pointing markdown_file: to any local .md file renders it through doc_viewer automatically and reloads edits dynamically on the next page fetch without restarting the server.
markdown_file:
.md
</Tip>