Skip to main content
Version: v5

Attachment

Component to render the message attachments within the MessageList.

This is the default component provided to the prop Attachment on the Channel component. It renders relevant component according to type of the attachment (for example card, Giphy, file etc). Generally you wouldn't need to use this component for customization, you should instead use specific attachment type related prop such as Giphy, Gallery, UrlPreview, FileAttachment etc. Please check our guide on Attachment Customization for details.

Props#

required
attachment#

Attachment object to render UI for. This is basically a value from attachments array on message object - message.attachments[0].

Type
object

overrides the value from MessagesContext
AttachmentActions#

Component to render additional actions on attachment. for example send, shuffle, cancel in case of Giphy.

TypeDefault
componentAttachmentActions

overrides the value from MessagesContext
Card#

Component to render any custom type of attachment. Please check the guides for Custom Attachment

TypeDefault
componentCard

overrides the value from MessagesContext
FileAttachment#

Component to render 'file' type attachment in MessageList.

TypeDefault
componentFileAttachment

overrides the value from MessagesContext
Gallery#

Component to render 'image' type attachments in the MessageList.

TypeDefault
componentGallery

overrides the value from MessagesContext
Giphy#

Component to render Giphy type attachments in MessageList.

TypeDefault
componentGiphy

overrides the value from MessagesContext
UrlPreview#

Component to render preview of URLs in MessageList.

TypeDefault
componentCard

Did you find this page helpful?