For development, import
UserMediaMessage from @servicetitan/anvil2-ai-kit. For design, find it in the AI Kit Web Component Library file.- Implementation
- UserMediaMessage Props
- MediaAttachment
Common Examples
Pass oneMediaAttachment through media. The attachment has no toolbar.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 theai-kit.mediaAttachment.* messages. Localize
fileName, fileTypeLabel, and error before passing them.React Accessibility
- Image previews use
alt, falling back tofileName. - Video and audio expose localized media controls.