# Giphy

Renders Giphy attachments inside [`MessageList`](https://getstream.io/chat/docs/sdk/react-native/v8/ui-components/message-list/). This is the default component for the [`Giphy`](https://getstream.io/chat/docs/sdk/react-native/v8/core-components/channel#giphy) prop.

## Best Practices

- Use `handleAction` for approved Giphy actions (send, shuffle, cancel).
- Keep Giphy previews lightweight to avoid scroll jank.
- Respect `setOverlay`/gallery context for full-screen viewing.
- Provide clear affordances for confirming or canceling Giphy sends.
- Use `ImageComponent` for consistent image handling and caching.

## Props

### `attachment`

Attachment object for a `giphy` type attachment.

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

### `additionalPressableProps`

Extra props passed to the underlying [Pressable](https://reactnative.dev/docs/pressable#props) used in message components like [`MessageContent`](https://getstream.io/chat/docs/sdk/react-native/v8/ui-components/message-content/).

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

### `handleAction`

Sends an attachment action on a message (for example, Giphy Shuffle/Cancel/Send).

| Type                                       |
| ------------------------------------------ |
| `(name: string, value: string) => Promise` |

### `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 |

### `setSelectedMessage`

Setter for value [`selectedMessage`](https://getstream.io/chat/docs/sdk/react-native/v8/contexts/image-gallery-context#selectedmessage).

| Type                                                             |
| ---------------------------------------------------------------- |
| `(selectedMessage: {messageId?: string; url?: string;}) => void` |

### `setMessages`

Setter for value [`messages`](https://getstream.io/chat/docs/sdk/react-native/v8/contexts/image-gallery-context#messages).

| Type                                 |
| ------------------------------------ |
| `(messages: LocalMessage[]) => void` |

### `setOverlay`

Setter for [`overlay`](https://getstream.io/chat/docs/sdk/react-native/v8/contexts/overlay-context#overlay). You can use this setter to show the overlay.

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

## UI Component Props

### `ImageComponent`

Drop-in replacement for all underlying [`Image`](https://reactnative.dev/docs/next/image) components in the SDK. Useful for offline image caching. See the [Offline Support Guide](https://getstream.io/chat/docs/sdk/react-native/v8/basics/offline-support/).

| Type          | Default                                            |
| ------------- | -------------------------------------------------- |
| ComponentType | [`Image`](https://reactnative.dev/docs/next/image) |

---

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