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

PropDescriptionType
attachmentAttachment object for a giphy type attachment.object
additionalPressablePropsExtra props passed to the underlying Pressable used in message components like MessageContent.object
giphyVersionThe Giphy rendition version to render (for example, 'fixed_height').string
handleActionSends an attachment action on a message (for example, Giphy Shuffle/Cancel/Send).(name: string, value: string) => Promise
isMyMessageTrue if the message was sent by the current user.boolean
onLongPressDefault long press handler for message UI.function
onPressDefault press handler for message UI.function
onPressInDefault pressIn handler for message UI.function
preventPressDisable 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>