sw-ui-content-drawer
sw-ui-content-drawer
sw-ui-content-drawer
Slide-in drawer that displays rich content the agent pushed mid-call (a snippet, a markdown article, a sanitized HTML fragment, or plain text) without leaving the call view.
Used by <sw-call-widget> to render display_content user events from
the AI agent. The drawer auto-orients itself to the available space:
Four content formats are supported, each with appropriate sanitisation:
text — rendered verbatim with whitespace preserved.markdown — parsed via marked, sanitised via DOMPurify with a
strict tag/attribute allowlist; target="_blank" links are rewritten
with rel="noopener noreferrer".code — highlighted via Prism; the language must be supplied in
payload.language and is loaded lazily.html — passed through DOMPurify with the same allowlist as markdown.Class: SwUiContentDrawer · Module: packages/web-components/src/components/UI/layout/sw-ui-content-drawer.ts
SwUiContentDrawer, sw-ui-content-draweropen field.
narrow field.
title field.
content field.
format field.
language field.