Skip to main content
For development, import UserMediaMessage from @servicetitan/anvil2-ai-kit. For design, find it in the AI Kit Web Component Library file.

Common Examples

Pass one MediaAttachment through media. The attachment has no toolbar.
When showPreview is true, documents use a linked metadata row, images and videos expand above their metadata, and audio provides inline playback. Set it to false for the compact document-row treatment across all kinds.Pass error to show a failed-send line under the bubble.

Internationalization

Media playback uses the ai-kit.mediaAttachment.* messages. Localize fileName, fileTypeLabel, and error before passing them.

React Accessibility

  • Image previews use alt, falling back to fileName.
  • Video and audio expose localized media controls.
Last modified on October 28, 2026