When <sw-call-widget> doesn’t fit the layout, drop down to the
primitives. The widget itself is built from the same elements,
wired together through reactive contexts.
Three patterns, in increasing order of customization:
<sw-call-widget>, replace one region (trigger
or background).<sw-call-provider>, <sw-call-media>, <sw-call-controls>,
etc. directly.<sw-call-widget> exposes a background slot for the full-bleed
background and a default slot for the idle-state trigger. Anything
in the default slot becomes the click target; clicking calls
widget.dial().
Once dialing starts the widget swaps into call mode (inline or
modal, per the modal attribute).
<sw-call-widget> exposes dial() and hangup() for driving
dialing from JS instead of the trigger slot:
The widget bubbles sw-dial, sw-call-ended, and forwarded agent
events:
See <sw-call-widget> for the full event surface.
Widget attributes toggle sub-features:
transcription — enables the AI transcript drawer.allow-incoming-calls — listens for inbound calls on the same token.audio-only — skips the camera.user-variables — JSON string forwarded into the Verto invite for
the receiving side to read.See <sw-call-widget> for the full attribute list.
For full layout control, compose the primitives directly.
<sw-call-provider> is the only required wrapper — it owns the
reactive contexts that the SDK-aware components subscribe to.
For the embed bundle, replace the imports with
const { SignalWire, StaticCredentialProvider } = SignalWireUI; and
drop <script type="module">.
<sw-call-provider> mounts reactive contexts for call state,
devices, transcript, and forwarded user events. Set .call and
.deviceController; every nested SDK-aware element subscribes
automatically. State changes (participant joins, device changes,
transcript lines) push through the contexts to whichever components
are listening.
Each primitive bubbles its own composed events:
<sw-call-controls> emits sw-mute-audio / sw-mute-video /
sw-hangup; <sw-call-dialpad> emits sw-digit-press;
<sw-device-selector> emits sw-device-change. Events bubble
across shadow DOM:
Per-element event payloads are listed in the Web Components reference.
Because components subscribe to context independently, a custom element that dispatches the same composed events is a drop-in replacement.
SDK-aware components don’t talk to each other directly — they all go through the call object — so any element emitting the right events fits.
See Theming for the visual side and the Web Components reference for per-element attributes, slots, and events.