Card

Renders custom attachments inside MessageList. See Custom Attachment for usage.

Best Practices

  • Provide fallback values when image_url or thumb_url are missing.
  • Keep card content concise to avoid oversized previews.
  • Use og_scrape_url for navigation and avoid custom link logic.
  • Ensure press handlers are lightweight and accessible.
  • Customize via CardHeader/CardCover/CardFooter for consistent styling.

Props

additionalPressableProps

Extra props passed to the underlying Pressable used in message components like MessageContent.

Type
object

author_name

Author name shown in the card footer.

Type
string

image_url

Cover image URL. If missing, thumb_url is used.

Type
string

og_scrape_url

URL to open when the card is pressed.

Type
string

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

text

Text description shown in the card footer.

Type
string

thumb_url

Thumbnail URL for cover image.

Type
string

title

Title shown in the card footer.

Type
string

UI Component Props

CardCover

Renders the main body of Card attachments. See Custom Attachment.

Type
ComponentType

CardFooter

Renders the footer for Card attachments. See Custom Attachment.

Type
ComponentType

CardHeader

Renders the header for Card attachments. See Custom Attachment.

Type
ComponentType

ImageComponent

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

TypeDefault
ComponentTypeImage