Skip to content

Interactive

Buttons, toggles, and tappable wrappers.

button

Tier: core

Tappable button that opens a URL or emits widget-action.

button (calculator.small)

From showcase preset — case calculator.small.

Properties

PropertyTypeDefaultDescription
actionstringAction identifier — emits a widget-action Tauri event when tapped.
backgroundBackgroundValueSolid, adaptive, or gradient background.
backgroundColorColorValueButton background color.
borderBorderConfigBorder color and width.
clipShapeClipShapeClip content to a shape (e.g. circle avatar from square image).
colorColorValueLabel text color.
cornerRadiusnumberCorner radius in points.
flexnumberLayout weight for flexible sizing inside stacks (like Android layout_weight).
fontSizenumberLabel font size in points.
frameFrameConfigExplicit width / height / max constraints.
labelstringButton label text.
opacitynumberOpacity from 0 (invisible) to 1 (opaque).
paddingPaddingValueInset padding (number or per-edge object).
shadowShadowConfigDrop shadow.
textAlignmentTextAlignmentLabel text alignment.
urlstringDeep link URL to open the app (used when no action is set).

Examples

Minimal

json
{
  "type": "button",
  "label": "Refresh",
  "action": "refresh",
  "color": "#fff",
  "backgroundColor": "#0284c7",
  "fontSize": 14,
  "cornerRadius": 10
}

From showcase calculator.small

json
{
  "type": "button",
  "label": "C",
  "action": "calc:C",
  "backgroundColor": "#636366",
  "color": "#fff",
  "fontSize": 10,
  "cornerRadius": 6,
  "padding": {
    "top": 1,
    "bottom": 1,
    "leading": 2,
    "trailing": 2
  }
}

From showcase layout.small

json
{
  "type": "button",
  "label": "Go",
  "action": "go",
  "backgroundColor": "#2196F3",
  "color": "#fff"
}

Inside a WidgetConfig

json
{
  "small": {
    "type": "button",
    "label": "Refresh",
    "action": "refresh",
    "color": "#fff",
    "backgroundColor": "#0284c7",
    "fontSize": 14,
    "cornerRadius": 10
  }
}

toggle

Tier: extended

On/off toggle control.

toggle (toggle-row.small)

From showcase preset — case toggle-row.small.

Properties

PropertyTypeDefaultDescription
actionstringAction identifier sent back to the app.
backgroundBackgroundValueSolid, adaptive, or gradient background.
borderBorderConfigBorder color and width.
clipShapeClipShapeClip content to a shape (e.g. circle avatar from square image).
cornerRadiusnumberCorner radius in points.
flexnumberLayout weight for flexible sizing inside stacks (like Android layout_weight).
frameFrameConfigExplicit width / height / max constraints.
isOnbooleanWhether the toggle is on.
labelstringOptional label beside the control.
opacitynumberOpacity from 0 (invisible) to 1 (opaque).
paddingPaddingValueInset padding (number or per-edge object).
shadowShadowConfigDrop shadow.
tintColorValueAccent color when on.

Examples

Minimal

json
{
  "type": "toggle",
  "isOn": true,
  "label": "Dark mode",
  "tint": "#38bdf8",
  "action": "toggle-dark"
}

From showcase toggle-row.small

json
{
  "type": "toggle",
  "isOn": true,
  "label": "Wi-Fi",
  "tint": "#22c55e",
  "color": "#e2e8f0",
  "action": "toggle_wifi"
}

Inside a WidgetConfig

json
{
  "small": {
    "type": "toggle",
    "isOn": true,
    "label": "Dark mode",
    "tint": "#38bdf8",
    "action": "toggle-dark"
  }
}

Tier: core

Tappable wrapper — makes nested content clickable.

link (link-chip.small)

From showcase preset — case link-chip.small.

Properties

PropertyTypeDefaultDescription
actionstringAction identifier — emits widget-action event.
backgroundBackgroundValueSolid, adaptive, or gradient background.
borderBorderConfigBorder color and width.
childrenWidgetElement[]Nested content to wrap.
clipShapeClipShapeClip content to a shape (e.g. circle avatar from square image).
cornerRadiusnumberCorner radius in points.
flexnumberLayout weight for flexible sizing inside stacks (like Android layout_weight).
frameFrameConfigExplicit width / height / max constraints.
opacitynumberOpacity from 0 (invisible) to 1 (opaque).
paddingPaddingValueInset padding (number or per-edge object).
shadowShadowConfigDrop shadow.
urlstringDeep-link URL to open.

Examples

Minimal

json
{
  "type": "link",
  "action": "open-details",
  "payload": "item-1",
  "children": [
    {
      "type": "hstack",
      "spacing": 6,
      "alignment": "center",
      "children": [
        {
          "type": "text",
          "content": "Details",
          "color": "#38bdf8",
          "fontWeight": "medium"
        },
        {
          "type": "image",
          "systemName": "chevron.right",
          "size": 12,
          "color": "#38bdf8"
        }
      ]
    }
  ]
}
json
{
  "type": "link",
  "action": "open_settings",
  "padding": 8,
  "cornerRadius": 999,
  "background": "#1e293b",
  "children": [
    {
      "type": "hstack",
      "spacing": 6,
      "alignment": "center",
      "children": [
        {
          "type": "image",
          "systemName": "gear",
          "size": 14,
          "color": "#38bdf8"
        },
        {
          "type": "text",
          "content": "Settings",
          "fontSize": 13,
          "fontWeight": "medium",
          "color": "#e2e8f0"
        }
      ]
    }
  ]
}

Inside a WidgetConfig

json
{
  "small": {
    "type": "link",
    "action": "open-details",
    "payload": "item-1",
    "children": [
      {
        "type": "hstack",
        "spacing": 6,
        "alignment": "center",
        "children": [
          {
            "type": "text",
            "content": "Details",
            "color": "#38bdf8",
            "fontWeight": "medium"
          },
          {
            "type": "image",
            "systemName": "chevron.right",
            "size": 12,
            "color": "#38bdf8"
          }
        ]
      }
    ]
  }
}

Released under the MIT License. · Contributing