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
What you get
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" });