# SendButton

Renders the send button inside [`MessageInput`](https://getstream.io/chat/docs/sdk/react-native/v8/ui-components/message-input/). This is the default component for the [`SendButton`](https://getstream.io/chat/docs/sdk/react-native/v8/core-components/channel#sendbutton) prop.

## Best Practices

- Disable the button when the input is invalid or the channel is disabled.
- Use `sendMessage` from context to keep behavior consistent.
- Keep the button visually distinct but not distracting.
- Avoid side effects in render; handle send in the handler only.
- Override via `Channel` prop instead of modifying internal components.

## Props

### `disabled`

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

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

### `sendMessage`

Sends a composed message within `MessageInput` component to channel. This function is attached to `onPress` handler of [`SendButton`](https://getstream.io/chat/docs/sdk/react-native/v8/core-components/channel#sendbutton). The message optimistically gets added to message list UI first, before actually making API call to server.
During this intermediate stage, MessageStatus component will display an indicator for "pending" state.

| Type     |
| -------- |
| Function |

The function takes an object as a parameter with the following properties:

| Parameter      | Description                                                        |
| -------------- | ------------------------------------------------------------------ |
| `localMessage` | Contains the message data that will be shown in the UI immediately |
| `message`      | Contains the data that will be sent to the backend                 |
| `options`      | Contains options for sending/updating the message                  |

---

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