# AttachButton

Renders the attachment picker button inside [`MessageInput`](/chat/docs/sdk/react-native/v8/ui-components/message-input/). This is the default component for the [`AttachButton`](/chat/docs/sdk/react-native/v8/core-components/channel#attachbutton/) prop.

## Best Practices

- Disable the button when permissions or capabilities are missing.
- Use `handleAttachButtonPress` for custom flows instead of bypassing the picker.
- Avoid heavy work in `handleOnPress` to keep input responsive.
- Keep the button visible only when attachments are supported.
- Use `toggleAttachmentPicker` to keep state in sync.

## Props

### `disabled`

True if channel is [frozen](/chat/docs/javascript/disabling_channels/) and [disableIfFrozenChannel](/chat/docs/sdk/react-native/v8/core-components/channel#disableiffrozenchannel/) is true.

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


### `handleOnPress`

Press handler.

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

### `handleAttachButtonPress`

Customize behavior when the [AttachButton](/chat/docs/sdk/react-native/v8/ui-components/attach-button/) is pressed in the message input.

| Type         |
| ------------ |
| `() => void` |

### `selectedPicker`

Value is `images` (string), when image attachment picker is open else `undefined`.

| Type                  |
| --------------------- |
| 'images' \| undefined |


### `toggleAttachmentPicker`

Function to toggle attachment picker. By default, this function is attached to `onPress` handler for [`AttachButton`](/chat/docs/sdk/react-native/v8/core-components/channel#attachbutton/).

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


---

This page was last updated at 2026-04-17T17:33:44.725Z.

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