# URLPreview

`URLPreview` renders rich link previews for message attachments. This is the default component for the [`UrlPreview`](/chat/docs/sdk/react-native/core-components/channel#urlpreview/) prop.

## Best Practices

- Use rich previews when link context is important.
- Keep preview text concise for better truncation.
- Reuse default safe URL opening behavior in custom handlers.
- Keep custom styles additive to preserve spacing and hit targets.
- Use compact mode (`URLPreviewCompact`) when you need denser message rows.

## Props

| Prop                       | Description                                                                                                                                                                                                    | Type       |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `attachment`               | Attachment object used for preview content.                                                                                                                                                                    | `object`   |
| `additionalPressableProps` | Extra props passed to the underlying [Pressable](https://reactnative.dev/docs/pressable#props) used in message components like [`MessageContent`](/chat/docs/sdk/react-native/ui-components/message-content/). | `object`   |
| `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.                                                                                                                                                                                    | `boolean`  |
| `isAttachmentEqual`        | Custom equality check used for attachment memoization.                                                                                                                                                         | `function` |
| `styles`                   | Style overrides for URL preview internals (`container`, `cardCover`, `cardFooter`, `title`, `description`, `linkPreview`, `linkPreviewText`).                                                                  | `object`   |

`ImageComponent` is provided through [`WithComponents`](/chat/docs/sdk/react-native/customization/custom_components/) and read internally via `useComponentsContext()`.


---

This page was last updated at 2026-04-17T17:33:45.771Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/ui-components/url-preview/](https://getstream.io/chat/docs/sdk/react-native/ui-components/url-preview/).