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 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
handleActionSends an attachment action on a message (for example, Giphy Shuffle/Cancel/Send).(name: string, value: string) => Promise
onLongPressDefault long press handler for message UI.function
onPressDefault press handler for message UI.function
onPressInDefault pressIn handler for message UI.function
setSelectedMessageSetter for value selectedMessage.(selectedMessage: {messageId?: string; url?: string;}) => void
setMessagesSetter for value messages.(messages: LocalMessage[]) => void
setOverlaySetter for overlay. You can use this setter to show the overlay.(overlay) => void

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

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