# MessageContent

> **Info:** This is documentation for **Stream Chat React Native SDK v6**, which is no longer actively maintained. For up-to-date documentation, see the [latest version (v10)](https://getstream.io/chat/docs/sdk/react-native/).

Component to render content of a message within the [`MessageList`](https://getstream.io/chat/docs/sdk/react-native/v6/ui-components/message-list/). Message avatar and reactions are not part of `MessageContent`.
This is the default component provided to the prop [`MessageContent`](https://getstream.io/chat/docs/sdk/react-native/v6/core-components/channel/#messagecontent) on the `Channel` component.

## Props

### `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/v6/ui-components/message-content/).

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

### `alignment`

Sets if the message should be aligned to right or left side of list.

| Type                  | Default |
| --------------------- | ------- |
| enum('right', 'left') | 'right' |

### `backgroundColor`

Background color for the message content.

| Type                    |
| ----------------------- |
| `string` \| `undefined` |

### `disabled`

True if channel is [frozen](https://getstream.io/chat/docs/javascript/disabling-channels/) and [disableIfFrozenChannel](https://getstream.io/chat/docs/sdk/react-native/v6/core-components/channel/) is true.

| Type    |
| ------- |
| Boolean |

### `goToMessage`

A function that scrolls to a specific message in the chat. This function is useful when you want to scroll to a specific message in the chat.

| Type                                        | Default     |
| ------------------------------------------- | ----------- |
| `(messageId: string) => void`\| `undefined` | `undefined` |

### `groupStyles`

Position of message in the group. A message group is a group of consecutive messages from the same user. `groupStyles` can be used to style the message as per their position in message group.

For example, user avatar (to which message belongs to) is only showed for last (bottom) message in group.

| Type                                               |
| -------------------------------------------------- |
| array of enum('top', 'bottom', 'middle', 'single') |

### `isAttachmentEqual`

Function which returns true if passing `nextAttachment` to render would return the same result as passing `prevAttachment` to render, otherwise return false.

| Type     |
| -------- |
| function |

| Parameter      | Description                                |
| -------------- | ------------------------------------------ |
| prevAttachment | previous message attachment to be compared |
| nextAttachment | next message attachment to be compared     |

### `isEditedMessageOpen`

Boolean to check the message edited label is expanded or not.

| Type    | Default |
| ------- | ------- |
| Boolean | `false` |

### `isMyMessage`

True if the message is sent by current user (connected to chat).

| Type    |
| ------- |
| boolean |

### `message`

Message object.

| Type           |
| -------------- |
| `Message` type |

### `messageContentOrder`

Order of message content.

for example `['quoted_reply', 'attachments', 'file', 'gallery', 'text']`

| Type  |
| ----- |
| array |

### `MyMessageTheme`

[Theme](https://getstream.io/chat/docs/sdk/react-native/v6/customization/theming/) applied to messages of the current user.

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

>
> **Warning:** Please make sure to memoize or pass static reference for this object.
>

### `noBorder`

If `true`, the message content will not have a border.

| Type                    | Default |
| ----------------------- | ------- |
| `Boolean`\| `undefined` | `false` |

### `onLongPress`

Default long press handler for message UI.

| Type     |
| -------- |
| function |

### `onPress`

Default press handler for message UI.

| Type     |
| -------- |
| function |

### `onPressIn`

Default `pressIn` handler for message UI.

| Type     |
| -------- |
| function |

### `otherAttachments`

All the attachments on the message except for types `file` and `image`.

| Type  |
| ----- |
| Array |

### `preventPress`

### `threadList`

True if current message is part of a message thread.

| Type    |
| ------- |
| Boolean |

## UI Component Props

### `Attachment`

Component for rendering attachments in MessageList.

Available props:

- `attachment` `{object}`

| Type          | Default                                                                  |
| ------------- | ------------------------------------------------------------------------ |
| ComponentType | [`Attachment`](https://getstream.io/chat/docs/sdk/react-native/v6/ui-components/attachment/) |

### `FileAttachmentGroup`

Component to render group of `file` type attachments, when there are multiple `file` type attachments in message.

| Type          | Default                                                                                      |
| ------------- | -------------------------------------------------------------------------------------------- |
| ComponentType | [`FileAttachmentGroup`](https://getstream.io/chat/docs/sdk/react-native/v6/ui-components/file-attachment-group/) |

### `Gallery`

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

| Type          | Default                                                            |
| ------------- | ------------------------------------------------------------------ |
| ComponentType | [`Gallery`](https://getstream.io/chat/docs/sdk/react-native/v6/ui-components/gallery/) |

### `MessageError`

Component to customize the message error component.

| Type          | Default                                                                       |
| ------------- | ----------------------------------------------------------------------------- |
| ComponentType | [`MessageError`](https://getstream.io/chat/docs/sdk/react-native/v6/ui-components/message-error/) |

### `Reply`

Component to render preview of parent of message for quoted reply.

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

---

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