# FileAttachment

Component to render file attachments within the [`MessageList`](https://getstream.io/chat/docs/sdk/react-native/v7/ui-components/message-list/).

## Basic Usage

You can customize this component and provide it back to the SDK via the [`FileAttachment`](https://getstream.io/chat/docs/sdk/react-native/v7/core-components/channel/#fileattachment) prop on `Channel` if desired.

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

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

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

## Props

### `attachment`

Attachment object for `file` type attachment.

| Type   |
| ------ |
| Object |

### `attachmentSize`

Size of an attachment icon. This value gets passed to [`FileAttachmentIcon`](#fileattachmenticon) component.

| Type   |
| ------ |
| Number |

### `additionalPressableProps`

Additional props provided to the underlying [Pressable](https://reactnative.dev/docs/pressable#props) used by components within a message such as [`MessageContent`](https://getstream.io/chat/docs/sdk/react-native/v7/ui-components/message-content/).

| Type   |
| ------ |
| object |

## UI Component Props

### `AttachmentActions`

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

| Type          | Default                                                                                                                                      |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| ComponentType | [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/AttachmentActions.tsx) |

### `FileAttachmentIcon`

Component to render file icon for `file` type attachment.

| Type          | Default                                                                                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| ComponentType | [`FileIcon`](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/components/Attachment/FileIcon.tsx) |

---

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/v7/ui-components/file-attachment/](https://getstream.io/chat/docs/sdk/react-native/v7/ui-components/file-attachment/).