Guide

Core vs extended

Not every element is held to the same cross-platform bar. Pixel-identical Core+Extended everywhere is not possible — Adaptive Cards, Glance, and WidgetKit each miss overlays, live timers, or network fetch. Aim for a portable Core and treat Extended as best-effort.

Core

Core means the element is present on every matrix platform and keeps its IR semantics (layout role, text, tap target, bitmap image, …). It does not mean identical pixels. Degraded cells (for example Windows zstack / shape, or image.systemName outside Apple) are documented in the matrix below — check them before assuming Board/Glance look like WidgetKit.

The authoritative list is CORE_ELEMENTS in src/snapshot.rs (also mirrored under Capability matrix). Prefer that set when you need broad coverage.

Portable Core checklist

  • Prefer solid backgrounds (or accept gradient bake / first-stop degradation).
  • Prefer image.data / image.url over image.systemName for Board/Android parity — SF Symbols exist only on Apple; elsewhere the feature row is degraded (glyph/emoji).
  • Remote image.url is prefetched on the host where wired — do not rely on live network inside the extension process.
  • Prefer Desktop webview when you need true overlays, live timers, or full SVG canvas.

Extended

Extended (EXTENDED_ELEMENTS) is best-effort and platform-dependent. Expect degraded or unsupported cells (live timer on Windows Board, chart rasterization on Adaptive Cards). The live list is in the matrix section.

How to read the matrix

LevelMeaning
fullSupported with the intended semantics
degradedRenders with known limitations (see footnotes under the matrix)
unsupportedDo not rely on this feature on that platform

Desktop column: one IR path shared by the desktop webview hosts — WKWebView (macOS window), WebView2 (Windows window), and webkit2gtk (Linux). Semantics match; differences are system fonts and CSS engine version. Linux also has its own golden stand (tests/golden/linux/) for pinning / layer-shell, but it is not a sixth matrix column. Windows Widgets Board (Adaptive Cards) is the separate Windows column.

Showcase presets exercise both tiers.

Runtime behavior

Capability warnings on setWidgetConfig

Each setWidgetConfig runs validate_config for the current host platform and emits log::warn! via log_capabilities when a used element or feature is degraded / unsupported (for example image.systemName outside Apple). Warnings are advisory — the write still proceeds. There is no public guest API to dry-run validation yet; treat host logs (and the matrix) as the source of truth before shipping a config.

Skipped elements in render receipts

When a renderer cannot express a node (common on Adaptive Cards without the rasterize feature, or after a flatten), the element is recorded on the render receipt as skipped: [{ type, reason }], not as a silent hole you must guess about.

Inspect recent receipts with getWidgetDiagnostics(group):

import { getWidgetDiagnostics } from "tauri-plugin-widgets-api";

const receipts = await getWidgetDiagnostics("com.example.widgets");
for (const r of receipts) {
  if (r.skipped?.length) {
    console.warn(r.widgetId, r.skipped);
    // e.g. [{ type: "canvas", reason: "adaptive-cards: enable crate feature `rasterize`" }]
  }
}

Desktop / debug builds can also use getWidgetTrace(group) for the host journal plus receipt history.

Capability matrix

Table is authored in src/capabilities.rs; this page embeds it automatically. Refresh with cargo test --lib capabilities::write_docs::capability_matrix_doc_matches (delete docs/generated/capability-matrix.md first if drifted) then pnpm docs:generate.

Element lists

Core (CORE_ELEMENTS in src/snapshot.rs): vstack, hstack, zstack, container, grid, text, image, spacer, divider, progress, button, link, shape

Extended (EXTENDED_ELEMENTS): gauge, toggle, date, chart, list, timer, canvas, label

Core

ElementiOSmacOSAndroidDesktopWindows
vstackfullfullfullfullfull1
hstackfullfullfullfullfull1
zstackfullfullfullfulldegraded2
containerfullfullfullfullfull1
gridfullfullfullfullfull1
textfullfullfullfullfull1
imagefullfullfull3fullfull4
spacerfullfullfullfullfull1
dividerfullfullfullfullfull1
progressfullfullfullfullfull1
buttonfullfullfullfullfull1
linkfullfullfullfullfull1
shapefullfullfullfulldegraded5

Extended

ElementiOSmacOSAndroidDesktopWindows
gaugefullfullfullfulldegraded5
togglefullfullfullfullfull1
datefullfullfullfullfull1
chartfullfullfull6full7degraded5
listfullfullfull8fulldegraded9
timerfullfullfull10full11degraded12
canvasfullfulldegraded13full7degraded5
labelfullfullfullfullfull1

Feature notes

FeatureiOSmacOSAndroidDesktopWindows
image.urlfull14full14full15fullfull16
image.systemNamefull17full17degraded18degraded18degraded19
background.gradientfull20full20full21full22degraded23
canvas.pathfull24full24full25full26degraded27
timer.livefull28full28full10full29degraded30
config.entriesfull31full31full32full33degraded34
config.stringsfullfullfullfullfull
config.sourcefull35full35full36full37unsupported38
config.instancefull39full39full40full41full42
style.privacySensitivefull43full43unsupported44unsupported45unsupported46
style.accessibilityLabelfullfullfull47full48unsupported
style.bindfullfullfullfullfull
style.whenfull49full49full49full49full49
style.transitionfull50full50unsupported51full52unsupported53
config.statefull54full54full55full56degraded57
activityfull58degraded59full60degraded61degraded61
activity.templatefull62full62full62full62full62
activity.islandfull63full64unsupported65full66full67

Choosing a surface set

Pick the platforms you ship, then stay in the full set for that profile. Degraded cells still render, but check the Notes and element pages.

Apple only

Platforms: iOS + macOS.

Apple + Android

Platforms: iOS + macOS + Android.

All five matrix columns

Platforms: iOS + macOS + Android + Desktop + Windows.

Notes

  1. Adaptive Cards 1.5
  2. rasterized PNG overlay when possible; else flattened Container
  3. url via localPath preprocess; see image.systemName
  4. url/data URI; see image.systemName
  5. rasterized PNG
  6. bitmap bar/line/area/pie
  7. SVG
  8. Column chunking; soft cap ~50 items
  9. Adaptive Cards Table
  10. Chronometer via AndroidRemoteViews
  11. setInterval
  12. provider minute push + static TextBlock
  13. bitmap canvas (full SVG path via PathParser)
  14. host prefetch to data URI on setWidgetConfig
  15. preprocess to localPath on setWidgetConfig
  16. Adaptive Cards Image.url
  17. SF Symbols
  18. SF→Material / emoji map (not SF Symbols)
  19. emoji TextBlock by default; glyph PNG Image with feature rasterize
  20. linear/radial/angular SwiftUI
  21. baked bitmap at LocalSize / frame
  22. linear/radial/angular CSS/SVG
  23. rasterized PNG backgroundImage when rasterize enabled
  24. SVG path grammar
  25. PathParser full SVG path
  26. SVG path
  27. rasterized via SVG
  28. Text(..., .timer)
  29. JS interval
  30. provider pushes UpdateWidget ~1/min
  31. WidgetKit timeline entries
  32. inexact alarm redraw (may run late in Doze)
  33. renderer timer
  34. card rebuilt by the host while the app runs
  35. fetched in the timeline (8 s budget)
  36. fetched on redraw, alarm when due
  37. fetched while the window is open
  38. board cannot fetch; push setWidgetData from the app
  39. Edit Widget choice (TauriInstanceIntent)
  40. appWidgetId
  41. window instance / label
  42. Widgets Board id
  43. .privacySensitive()
  44. no home-screen redaction
  45. data-privacy-sensitive attribute only
  46. no redaction
  47. Glance semantics contentDescription
  48. aria-label
  49. evaluated before rendering
  50. contentTransition(.numericText()) / .transition
  51. ignored (Glance has no content transitions)
  52. animation when the content changes
  53. ignored (Adaptive Cards)
  54. set taps run an AppIntent in the extension (iOS 17 / macOS 14)
  55. set taps handled by the widget's broadcast receiver
  56. set taps handled by the widget window
  57. Widgets Board shows the state; set taps are not handled
  58. Live Activity + Dynamic Island (iOS 16.2+)
  59. island pill at the notch (default) or corner window; no Lock Screen
  60. ongoing notification; Live Update chip on Android 16
  61. top-centre island pill (default) or corner window; no Lock Screen
  62. layout stored on the device, data-only updates
  63. Dynamic Island compact / minimal / expanded regions
  64. pill around the notch, under the menu bar without one; hover expands
  65. no island; the Live Update chip shows shortCriticalText
  66. top-centre pill: X11 dock window, Wayland layer-shell overlay
  67. top-centre topmost pill, no taskbar button, no focus steal