One JSON config. Five native surfaces.

Android Glance, Apple WidgetKit, Windows Adaptive Cards, and desktop webviews, from a single declarative IR.

One config, every surface

Nodes of a WidgetConfig become a native widget

vstackimagetextMoscowtext58°textHumidityprogresshstackMonTueWediOSAndroidmacOSWindowsLinux
Features

What you get

  • Five native surfaces
    Android Glance, iOS and macOS WidgetKit, Windows Widgets Board (Adaptive Cards) and desktop webviews, from one JSON tree.
  • Dynamic Island everywhere
    Live activities as an island on iPhone and as a pill around the notch on macOS, Windows and Linux.
  • Interactive widgets
    Buttons and toggles that reach your app, or change the widget by themselves with local state.
  • Timelines and live data
    Prepared layouts for later times, values from the app or fetched by the widget itself.
  • Tested screenshots
    Showcase images are the committed goldens: if a render regresses, the snapshot test and the docs image fail together.
  • Widget constructor
    Assemble a widget from blocks with a live preview and export the JSON.

Push a config, get a widget

setWidgetConfig stores the tree in the shared widget store; every surface renders it natively. On desktop, createWidgetWindow opens a frameless webview with the built-in renderer.
main.ts
import { setWidgetConfig, createWidgetWindow } from "tauri-plugin-widgets-api";

await setWidgetConfig({
  small: {
    type: "vstack", padding: 12, background: "#1a1a2e",
    children: [
      { type: "text", content: "72°", fontSize: 36, fontWeight: "bold", color: "#fff" },
      { type: "progress", value: 0.7, tint: "#4CAF50" },
    ],
  },
}, "group.com.example.myapp", "weather");

// Desktop: a frameless window with the built-in renderer.
await createWidgetWindow({ label: "weather", group: "group.com.example.myapp", widgetId: "weather", size: "small" });