Components
An app’s screens are built from exactly these 18 components (catalog 1.0.0). Each one is drawn with a native iPhone control. There are no custom components, and a definition that uses anything else does not validate.
Layout
Section titled “Layout”| Component | What it does |
|---|---|
| Screen | The root of every screen file. It sets the title, whether the content scrolls and whether it stays inside the safe area. |
| Stack | Lays its children out top to bottom. |
| Row | Lays its children out side by side. |
| Grid | Arranges its children in one or two equal columns. |
| Card | A container, usually styled as a raised panel. |
| Divider | A thin line between sections. |
Visual
Section titled “Visual”| Component | What it does |
|---|---|
| Text | Shows text: either fixed text or a value from your data. |
| Image | Shows an image bundled with the app. |
| Icon | Shows one of the built-in icons. |
| Badge | A short label in a pill. |
| Button | A button that goes to another screen or runs an operation. |
| Component | What it does |
|---|---|
| Input | A single-line field for text, a number or an email address. |
| TextArea | A multi-line text field. |
| Select | Lets the user pick one option from a list. |
| Switch | An on/off switch. |
| DatePicker | Lets the user pick a date. |
| Component | What it does |
|---|---|
| RecordList | Loads rows with a list operation and draws its one child once per row. |
| Form | Collects values for one model and saves them with an insert or update operation. |
The shape of a component
Section titled “The shape of a component”{ "id": "welcome", "type": "Text", "props": { "text": "Welcome" }, "preset": "heading", "style": { "color": "$color.primary" }}id: lowercase letters, digits and hyphens, unique within the screen.type: one of the components above.props: always present, even when empty ({}).preset: the name of a style preset fromtheme.json. Optional.style: style options for this one component, applied after the preset. Optional.children: required on containers, not allowed on the rest.