---
title: "Recipe: symbols"
description: "image \"symbol:<role>\" is an icon each host draws from its own set (SF Symbols on Apple, matching outlines elsewhere)."
modificationDate: "2026-11-19"
---

> ## 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.

# Recipe: symbols

<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/recipes/symbols: <what was wrong or missing>"`

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

</AgentInstructions>

`image "symbol:<role>"` is an icon each host draws from its set (SF Symbols on Apple,
matching outlines elsewhere). `image "symbol:sf/<name>"` is any SF Symbol by Apple's name.

```prompt Use symbols for my app's icons
Make the icons in the Exact app in this folder the platform's symbols. Use https://github.com/expo/exact/blob/main/docs/recipes/symbols.md as the source for each step. The Exact checkout has the same page at docs/recipes/symbols.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. List each icon the app draws, including emoji and characters used as icons (▦, ☏), with the symbol role you would use for it from `bun exact.mjs contract vocab symbol`. Show me the list and ask before you change anything.
3. In app.contract, draw each icon with `image "symbol:<role>"`; a role draws on every host. For an SF Symbol with no role, add an icon token to app.forma's `icons` with `sf` and a one-colour `svg` under assets/, and draw `symbol:icon.<name>`. `symbol:sf/<name>` alone draws only on Apple.
4. A button with only a symbol needs an `aria-label`. A symbol beside text that says the same takes `aria-hidden=true`. Leave the symbol's colour unsaid, and size it with its font (`font="-exact-title1"`), not `width`. Fix each `lower-symbol-alias` warning by writing the role it names.
5. Keep the existing tests passing without changing what they check.
6. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 7) and report it; do not keep trying.
7. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
8. Tell me each icon and its symbol, any icon left as it was and why, what the tests and checks reported, and the launch command for each target platform.
```

```contract
component Toolbar
  state starred = false
  action star
    starred = not starred
  view
    row gap=16 padding=16 align-items="center"
      button aria-label="Add" testId="add"
        image "symbol:add"
      button press=star aria-label=(starred ? "Unstar" : "Star") testId="star"
        image (starred ? "symbol:star-fill" : "symbol:star")
      button aria-label="Share" testId="share"
        image "symbol:share"
      image "symbol:sf/cloud.sun.rain" aria-label="Showers later" font="-exact-title1"
      row gap=6 align-items="center"
        image "symbol:calendar" aria-hidden=true
        text "Tomorrow"
```

`contract vocab symbol` lists every role. Unknown literals fail the build; computed
ones are checked at runtime. Aliases (`gearshape`, `trash`, `chevron-right`)
build with a `lower-symbol-alias` warning naming the role.

- A role draws everywhere; `sf/<name>` on Apple. Declare other icons in
  `app.forma`'s `icons`: `icon.rain = icon(sf "cloud.rain", svg "icons/rain.svg")`,
  used as `symbol:icon.rain`. Alias identical sources (`icon.shower = icon.rain`).
  Non-template SVGs draw on web, Linux and Apple except watchOS; Apple builds
  raster assets. `-exact-symbol-rendering="multicolor"` keeps their colours;
  otherwise they are tinted. Changing a raster SVG needs a new Apple binary.
  Package SVGs must be templates.
- A symbol-only button needs an `aria-label`. A tab is a symbol over its text. A symbol beside
  text that says the same is decoration: `aria-hidden=true`, so VoiceOver reads it once.
- `activity` is an ECG trace (heart, workouts). Done or not done is `DoneMark` (`exact:content`).
- Leave a symbol's colour unsaid: in a button it is the tint, and it follows dark mode.
  A `color` written on the symbol is its colour, as `currentcolor` paints an icon on the
  web; a row's `forward-chevron` is already grey.
  Emoji and characters (▦ ☏) aren't icons: they ignore the tint and differ by browser.
- `font` sets natural size; `font="-exact-title1"` follows text size.
  A template without `sf` uses its viewBox's aspect, its longer side at one em.
  An `sf` source keeps platform metrics; its SVG fallback meets the viewBox in an em square.
  On pages, `width` and `height` size its box.
  `object-fit="fill"` (default) fills the viewport, meeting the viewBox inside it;
  `"contain"` fits the natural box; `"cover"` fills and clips; `"none"` keeps natural
  size; `"scale-down"` only shrinks. `object-position` places it as for an SVG `<img>`.
- On iOS, a titled native button's symbol follows its title's font; a symbol-only
  button uses the platform's size. Its image's `font-size` overrides either.
  Native button images take no `width`,
  `height` or `object-fit`; to fit a symbol into an authored box, use
  `button appearance="none"`. Native bars, tabs and menus use platform symbol sizes.
