---
title: "Graphics, media, and native extensions"
description: "SVG uses SVG's tags and presentation names: svg, g, path, rect, gradients, masks, filters, text, and the rest of the admitted vocabulary."
modificationDate: "2026-11-30"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Graphics, media, and native extensions

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/learn/contract-for-humans/graphics-media-and-native-extensions: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

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](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/canvas-gallery/app.contract),
[SVG Gallery](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/svg-gallery/app.contract), and [the game workspace](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/game/README.md).

`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](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/video-player/app.contract) shows playback bindings and
[Markdown Stress](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/markdown-stress/app.contract) selection and editing;
[Markdown](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/markdown/app.contract) 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](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/photo-editor/app.contract)
as a concrete native-module example.
