Giphy

Renders Giphy attachments inside MessageList. This is the default component for the 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 used in message components like MessageContent.

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.

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

setMessages

Setter for value messages.

Type
(messages: LocalMessage[]) => void

setOverlay

Setter for overlay. You can use this setter to show the overlay.

Type
(overlay) => void

UI Component Props

ImageComponent

Drop-in replacement for all underlying Image components in the SDK. Useful for offline image caching. See the Offline Support Guide.

TypeDefault
ComponentTypeImage