sw-call-widget
sw-call-widget
All-in-one call widget — handles client initialisation, dialling, media, controls and optional AI transcript in either inline or modal mode.
The widget owns the entire call lifecycle:
- Builds a SignalWire credential provider from
token(+ optionalhost) and connects on demand viaclient-factory. - Wires
CallStateContextController,DevicesContextController,TranscriptController, andUserEventControllerso every nested SDK-aware component picks up live state for free. - Composes the visual layout from
<sw-ui-call-layout>,<sw-call-media>,<sw-local-camera>,<sw-call-controls>, and optionally<sw-ui-transcript-view>and<sw-ui-content-drawer>. - Shows an
<sw-ui-modal>overlay whenmodalis set, or renders inline (within the host’s bounding box) when it isn’t. - Listens for incoming-call signals via
IncomingCallControllerwhenallow-incoming-callsis enabled and prompts the user to accept.
Use the imperative dial() and hangup() methods to trigger the
widget programmatically, or click any element placed in the default
slot (the trigger) when in idle state.
Class: SwCallWidget · Module: packages/web-components/src/components/sw-call-widget/sw-call-widget.ts
class: SwCallWidget, sw-call-widget
Fields
token
token field.
host
host field.
destination
destination field.
modal
modal field.
transcription
transcription field.
allowIncomingCalls
allowIncomingCalls field.
audioOnly
audioOnly field.
userVariables
Custom variables sent with the Verto invite as a JSON object. The widget always advertises capabilities.display\_content and metadata.widget.opened\_at so the agent can detect that the caller supports the content drawer; user-supplied keys are merged in and win on shallow conflict. Invalid JSON is logged and ignored — the call still dials.
disableAutoTheme
Skip auto-injecting the SignalWire theme.css design-token stylesheet. Set this when the host page already loads @signalwire/web-components/theme.css or a custom theme written against the same DTCG token names.
disableAutoFonts
Skip auto-loading the SignalWire brand fonts (Lexend, Instrument Sans, JetBrains Mono) from Google Fonts. Set this when fonts are self-hosted or loaded elsewhere.