Skip to content

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.
  • Use giphyVersion to control the rendition size that gets rendered.
  • Provide clear affordances for confirming or canceling Giphy sends.
  • Use ImageComponent from useComponentsContext() for consistent image handling and caching.

Props

Prop Description Type
attachment Attachment object for a giphy type attachment. object
additionalPressableProps Extra props passed to the underlying Pressable used in message components like MessageContent. object
giphyVersion The Giphy rendition version to render (for example, 'fixed_height'). string
handleAction Sends an attachment action on a message (for example, Giphy Shuffle/Cancel/Send). (name: string, value: string) => Promise
isMyMessage True if the message was sent by the current user. boolean
onLongPress Default long press handler for message UI. function
onPress Default press handler for message UI. function
onPressIn Default pressIn handler for message UI. function
preventPress Disable press interactions for the Giphy attachment. boolean

ImageComponent is provided through WithComponents. To use a custom image component (e.g. for caching):

<WithComponents overrides={{ ImageComponent: FastImage }}>...</WithComponents>