Image
Shows an image bundled with the app.
Use it for: Logos and illustrations. Images come from the project’s assets folder, never from a URL.
- CategoryVisual
- ChildrenNone
- DataNone
- ActionNone
| Prop | Required | Accepts | What it does |
|---|---|---|---|
asset |
Yes | text in a fixed format | Path of an image in the project, for example assets/logo.png. |
alt |
Yes | text, up to 200 characters | What the image shows, for VoiceOver. |
fit |
Yes | contain, cover |
contain shows the whole image; cover fills the space and may crop. |
Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options.
Example
Section titled “Example”{ "id": "hero", "type": "Image", "props": { "asset": "assets/fitness.png", "alt": "Fitness app mark", "fit": "contain" }, "style": { "radius": "$radius.sm" }}The image file must exist in the project at .ynch/assets/logo.png. PNG, JPEG and WebP are accepted.