This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.

Graphics, media, and native extensions

SVG uses SVG's tags and presentation names: svg, g, path, rect, gradients, masks, filters, text, and the rest of the admitted vocabulary. SVG text is context-sensitive. foreignObject works on the web, but draws nothing through SVG use, and is refused on native hosts until a native box-in-scene implementation exists.
Canvas has two distinct providers: an app data module can record Canvas 2D calls, and an optional GPU module can provide a surface. Contract declares the canvas and its arguments; it is not a drawing-command language. Heavy computation and game loops belong in those modules. See Canvas Gallery, SVG Gallery, and the game workspace.
image, video, audio, iframe, and Markdown-capable text/editors use host facilities. Use object-fit for replaced media; distinguish text content from markup. Video Player shows playback bindings and Markdown Stress selection and editing; Markdown is a reader. A Markdown reader (text markup="markdown") renders on every host. The Markdown editor and format() run on the web, macOS and iOS; on Linux, Windows and Android a textarea markup="markdown" is a plain textarea of the source. Linux has no iframe or video.
A hyphenated tag can address the app's native module: the bake checks the tag against app.json's modules list, and its unknown attributes pass to the module unchecked; a known attribute styles or labels the module's box, and one the box has no use for is refused. A package view is declared in a dependency's exact.json views and accepts only its declared props and events beyond standard box attributes and common module events (lower-native-attr for an undeclared attribute). Merely inventing a tag does not create a widget. Native modules and GPU capabilities are separate optional artifacts; they do not add features to every core build. Use Photo Editor as a concrete native-module example.
Is this helpful
Last updated November 30, 2026
Exact Docs