This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8)
.
URLPreviewCompact
URLPreviewCompact renders compact link previews for attachments when urlPreviewType="compact".
Best Practices
- Use compact previews when message density is more important than rich previews.
- Keep custom styles additive to preserve card layout and tap targets.
- Use default press handlers for safe URL opening.
- Provide a fallback when image URLs are missing.
- Keep title/description text short for better truncation.
Props
attachment
Attachment object used for preview content.
| Type |
|---|
object |
additionalPressableProps
Extra props passed to the underlying Pressable used in message components like MessageContent.
| Type |
|---|
| object |
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 |
preventPress
Disable press interactions.
| Type |
|---|
boolean |
styles
Style overrides for compact preview internals (container, cardCover, cardFooter, title, description, linkPreview, linkPreviewText).
| Type |
|---|
object |
UI Component Props
ImageComponent
Image component used for preview thumbnails.
Drop-in replacement for all underlying Image components in the SDK. Useful for offline image caching. See the Offline Support Guide.
| Type | Default |
|---|---|
| ComponentType | Image |