- Implementation
- UserMediaMessage Props
- MediaAttachment
Common Examples
Pass oneMediaAttachment through media and the required send
timestamp. Copy defaults to media.fileName.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 with onRetry to show a failed-send line and retry action.
revealToolbarOnHover matches the user-message toolbar behavior.Internationalization
Media playback uses theai-kit.mediaAttachment.* messages. The action
toolbar uses ai-kit.messageToolbar.*. Localize fileName,
fileTypeLabel, and error before passing them.React Accessibility
- Image previews use
alt, falling back tofileName. - Video and audio expose localized media controls.
- Hover-hidden toolbars remain reachable from the keyboard and visible on touch.