Control views are interactive UI elements for displaying content, capturing user input, and triggering actions. All controls inherit from View and accept common modifiers such as width, height, padding, background, foreground_color, opacity, corner_radius, font, animation, and more as constructor parameters.
Display¶
| View | Description |
|---|---|
| Text | Displays one or more lines of read-only text with optional rich text support. |
| Label | Combines an SF Symbol icon with a text title. |
| Image | Displays an image from a URL, local file, asset reference, or raw bytes. |
| Video | Plays video content from a URL or local file with playback controls. |
| Markdown | Renders CommonMark/GitHub Flavored Markdown text natively. |
| ProgressView | Shows task progress as a determinate bar or indeterminate spinner. |
| Gauge | Displays a value within a bounded range using various gauge styles. |
| Divider | A thin visual separator line that adapts to its container orientation. |
Input¶
| View | Description |
|---|---|
| Button | An interactive control that triggers a callback when tapped. |
| TextField | A single-line text input field with placeholder and change callbacks. |
| SecureField | A single-line text input that masks entered characters for passwords. |
| TextEditor | A multi-line text editing area for longer content. |
| Toggle | A binary switch for toggling between on and off states. |
| Slider | A horizontal track with a draggable thumb for selecting a numeric value. |
| Picker | A selection control for choosing one option from a set. |
Rich Content¶
| View | Description |
|---|---|
| Table | Displays structured data in rows and columns with sorting and selection. |
| Map | An interactive MapKit map with markers, annotations, and overlays. |
| WebView | Embeds web content from a URL or raw HTML using WKWebView. |
| CameraPreview | Displays a live camera feed from a connected device. |