Skip to main content
Version: v4

FileAttachment

Component to render file attachments within the MessageList.

Basic Usage#

You can customize this component and provide it back to the SDK via the FileAttachment prop on Channel if desired.

Changing the size of the file attachment icon can be easily accomplished.

import { Channel, FileAttachment } from 'stream-chat-react-native';

<Channel FileAttachment={() => <FileAttachment attachmentSize={40} />}

Props#

required
attachment#

Attachment object for file type attachment.

Type
object

attachmentSize#

Size of an attachment icon. This value gets passed to FileAttachmentIcon component.

Type
number

overrides the value from MessagesContext
additionalTouchableProps#

Additional props provided to the underlying TouchableOpacity used by components within a message such as MessageContent.

Type
object

overrides the value from MessagesContext
AttachmentActions#

Component to render additional actions on attachment. e.g., send, shuffle, cancel in case of giphy.

TypeDefault
componentAttachmentActions

overrides the value from MessagesContext
FileAttachmentIcon#

Component to render file icon for file type attachment.

TypeDefault
componentFileIcon

Did you find this page helpful?