Components

widgets

5min

This component is an extension of the functionality of widgets on your

. It provides the same widgets to be available inside your

, giving them greater visual appeal and enhanced capabilities. This component is exclusive to the jig.default. - To understand what widgets do, see Widgets. - For a list of available widgets refer to example widgets.

Document image


Widgets are the foundational elements of your Home Hub, whereas components.widgets are displayed alongside other components within a

.

Configuration options



Core structure



jigId

Reference the

 to be opened when the widget is pressed.

size

Select either 1x1, 2x2, 2x4, 4x2, 4x4

Other options



input

configure parameters that will be sent as inputs to our

.

when

The ability to include or exclude a widget. If set to true the widget is included, if set to false the widget will not be displayed. Dynamically set this property by using expressions.

Examples

Widgets as components

Widget on a jig
Widget on a jig


This sample displays the 4x4 location widget and four 1x1 widgets. The widgets as components behave similarly to widgets on the

. By tapping on the widget you directed to the related

. The types and sizes available are the same as for Widgets. Examples: See the full example in GitHub.  See the folder with supporting files in GitHub. 







Widgets


Widget with onPress event

Widget with onPress event
Widget with onPress event


In this example, each widget is configured with an onPress event, which either opens a url, scanner, info-modal or maps.

Example: See the example in GitHub

YAML


See also





Updated 31 May 2024
Doc contributor
Did this page help you?