Expand description
Widget IR models (WidgetConfig, WidgetElement, …).
Element structs and their fields carry rustdoc used by schemars / docs site.
Widget IR types: [WidgetConfig], [WidgetElement], and shared style values.
Structs§
- Border
Config - Button
Element - Tappable button that opens a URL or emits
widget-action. - Canvas
Element - Declarative canvas — draw arbitrary shapes via JSON commands.
- Chart
Data Point - Chart
Element - Bar, line, area, or pie chart.
- Container
Element - Single-child wrapper for cards, badges, and overlays.
- Date
Element - Formatted date / relative time display.
- Divider
Element - Horizontal or vertical rule.
- Element
Style - Shared visual style applied to any element (padding, background, frame, …).
- Frame
Config - Gauge
Element - Circular or capacity-style gauge.
- Gradient
Config - Grid
Element - Fixed-column grid of children.
- HStack
Element - Horizontal stack of children.
- Image
Element - Image from SF Symbol / drawable name, base64 data, or URL.
- Label
Element - Convenience element combining an SF Symbol / icon with text.
- Link
Element - Tappable wrapper — makes nested content clickable.
- List
Element - Collection list of rows (text, optional checked marker and action).
- List
Item - Progress
Element - Linear or circular progress indicator.
- Shadow
Config - Shape
Element - Colored shape — circle, capsule, or rectangle.
- Spacer
Element - Flexible empty space.
- Text
Element - Text label with optional semantic typography.
- Timer
Element - Live countdown/countup timer that updates without timeline refresh.
- Toggle
Element - On/off toggle control.
- VStack
Element - Vertical stack of children.
- Widget
Config - Top-level widget config with layouts per size family.
- Widget
Window Config - Configuration for creating a desktop widget window.
- ZStack
Element - Overlay stack — children layered on top of each other.
Enums§
- Background
Value - Background: solid color string, adaptive pair, gradient, or material blur.
- Canvas
Draw Command - Chart
Type - Clip
Shape - Clip shape for content masking.
- Color
Value - Color value — hex string, semantic name, or adaptive
{ light, dark }pair. - Content
Mode - Date
Style - Font
Design - Font
Weight - Frame
Dimension - Gauge
Style - Gradient
Direction - Gradient
Type - Horizontal
Alignment - Padding
Value - Progress
Style - Shape
Type - Text
Alignment - Text
Style - Semantic text style — respects Dynamic Type / accessibility settings.
- Timer
Counting - Vertical
Alignment - Widget
Element - A UI element that can be a layout container or a leaf widget.
Functions§
- hstack
- Build an
HStackElementwith the given children. - text
- Build a
TextElementwith the given content. - vstack
- Build a
VStackElementwith the given children.