跳转到内容

@capgo/capacitor-widget-kit

Build interactive iOS widgets and Live Activities from Capacitor with shared App Group storage and declarative SVG templates.

Plugin overview

Capgo Widget Kit gives Capacitor apps a generic bridge for WidgetKit and ActivityKit. Store raw SVG templates, bind app state into widget surfaces, attach actions to hotspots, and read back the event log from your app.

SVG template bridge

Define lock-screen and widget layouts as SVG templates with placeholder bindings for state, timers, metadata, and actions.

Interactive actions

Attach declarative actions to hotspots or buttons and process the resulting event log later inside the app.

Timer bindings

Expose countdown and timer state to the template scope without manually synchronizing every display field.

Shared App Group storage

Let the widget extension load resolved layouts from shared storage without knowing the internal persistence format.