Widgets
Overview of the HWWidget building blocks.
Widgets
HWWidget is the base class for the layout primitives you compose inside @HomeWidget(widget: ...). They translate to SwiftUI on iOS and Jetpack Glance on Android at generation time.
Content
| Widget | Purpose |
|---|---|
HWText | Fixed or data-bound text. |
HWColoredBox | Solid background color around a child. |
HWDecoratedBox | Background color and/or border around a child. |
Branching
| Widget | Purpose |
|---|---|
HWAdaptive | Pick a different child per platform. |
HWConditional | Pick a child based on a runtime data check. |
Data only
| Widget | Purpose |
|---|---|
HWDataOnly | Declare data fields without rendering anything. |
See Data Types for the available HWDataType variants you can bind to widgets.