Web Components
The web components are themed through CSS — no JavaScript
configuration, no theme objects, no provider. The components consume
DTCG tokens shipped in theme.css;
overriding any of them at an ancestor element re-styles every
descendant component.
Two layers:
::part(...) selectors for restyling a specific
inner element when no token covers the change.Tokens are the stable surface and one declaration can restyle every element on the page. Parts couple to internal structure, so prefer tokens when both are available.
theme.css loads<sw-call-widget> and <sw-click-to-call> auto-inject
theme.css on first render. To control load order (override tokens
before the widget mounts, or self-host the stylesheet), set
disable-auto-theme on the widget and import explicitly:
The auto-load also pulls SignalWire brand fonts (Lexend, Instrument
Sans, JetBrains Mono) from Google Fonts. Set disable-auto-fonts if
the site already self-hosts them.
For most apps, a handful of tokens is enough:
The full token surface groups into foreground / background, interactive (buttons, inputs), structure (border, radius, spacing, transition), and typography. Each web-component reference page lists the tokens it consumes — start at the Web Components reference.
The defaults are tuned for dark UI. Scope light overrides to a wrapper; the bg / fg / border tokens propagate to the rest:
Combine with prefers-color-scheme to follow the visitor’s OS
preference.
Parts are named attachment points each component exposes for piercing shadow DOM.
Each reference page lists the parts the element exposes — see the Web Components reference.
For structural changes (layout, slot composition, swapping in controls), see Customization.