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.
Element structs, [WidgetConfig]/[WidgetElement], builders, and tests
live here; shared style values are in [style] and data payloads
([ChartDataPoint], [ListItem], [CanvasDrawCommand]) are in [data].
Structs§
- Border
Config - Border color and width.
- 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 - A single labeled data point for
crate::models::ChartElement. - 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 - Explicit width / height / max-size constraints for an element.
- Gauge
Element - Circular or capacity-style gauge.
- Gradient
Config - Linear, radial, or angular gradient background.
- 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 - A single row for
crate::models::ListElement. - Progress
Element - Linear or circular progress indicator.
- Shadow
Config - Drop shadow configuration.
- 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 - A single declarative draw command for
crate::models::CanvasElement. - Chart
Type - Chart kind.
- Clip
Shape - Clip shape for content masking.
- Color
Value - Color value — hex string, semantic name, or adaptive
{ light, dark }pair. - Content
Mode - How an image fills its frame.
- Date
Style - Date / relative-time display style.
- Font
Design - Font design (default, monospaced, rounded, serif).
- Font
Weight - Font weight.
- Frame
Dimension - A frame dimension — either a fixed point value or
"infinity". - Gauge
Style - Gauge visual style.
- Gradient
Direction - Direction for linear gradients.
- Gradient
Type - Gradient shape.
- Horizontal
Alignment - Horizontal alignment of children within a stack.
- Padding
Value - Inset padding — a single uniform value or per-edge overrides.
- Progress
Style - Progress indicator style.
- Shape
Type - Shape kind for
crate::models::ShapeElement. - Text
Alignment - Text alignment within the line.
- Text
Style - Semantic text style — respects Dynamic Type / accessibility settings.
- Timer
Counting - Countdown/countup direction for
crate::models::TimerElement. - Vertical
Alignment - Vertical alignment of children within a stack.
- 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.