Render rich media using image_display(), audio_player(), and video_player(), offer artifacts with file_download(), and safely embed custom HTML/SVG widgets in a sandboxed iframe with html() (alias html_embed()).
image_display()
audio_player()
video_player()
file_download()
html()
html_embed()
<ComponentPreview title="Image, File Download & Sandboxed HTML">
[
{"type": "image_display", "src": "/icon.svg", "alt": "PraisonAIUI Mark", "caption": "PraisonAIUI vector mark", "width": "64px"},
{"type": "file_download", "label": "Download JSON Schema", "href": "/aiui.schema.json", "filename": "aiui.schema.json", "variant": "outline"},
{"type": "html", "title": "Sandboxed HTML Widget", "height": 58, "content": "<div style=\"padding:10px 14px;font-family:system-ui,sans-serif;font-size:13px;border-radius:8px;background:#eef2ff;color:#312e81\">Rendered inside a sandboxed iframe (zero parent DOM access)</div>"}
]
</ComponentPreview>
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML">
</Tabs>
| Component | Parameter | Description |
|---|---|---|
| image_display | src, alt, caption, width | Responsive image with optional caption and max width. |
image_display
src
alt
caption
width
| audio_player / video_player | src, title, autoplay, poster | Native browser media players with safe URL validation. |
audio_player
video_player
title
autoplay
poster
| file_download | label, href, filename, variant | Styled download link/button with download attribute. |
file_download
label
href
filename
variant
download
| html / html_embed | content, height, csp, trusted, title | Isolated srcdoc iframe sandbox preventing XSS against the host app. |
html
html_embed
content
height
csp
trusted
srcdoc