Skip to main content

Link Preview

Overview

LMLinkPreview is a component used to display a preview of a link shared in a post. It fetches metadata from the provided URL, such as the title, description, and thumbnail image, and displays it in a styled card format. The preview typically includes an image, title, and a brief description, giving users a quick glimpse of the linked content.

LMFeedPostLinkCell

Callbacks

  • onCancel: Callback to handle tap events trigerred by on clicking of the cancel button.

Customisation

PropertyTypeDescription
onTapFunctionFunction to execute when the link preview is tapped.
showLinkUrlbooleanWhether to show the URL of the link preview.
linkPreviewBoxStyleViewStyleStyle for the container of the link preview.
linkTitleStyleTextStyleStyle for the link title text.
linkDescriptionStyleTextStyleStyle for the link description text.
linkUrlStyleTextStyleStyle for the link URL text.
linkImageStyleImageStyleStyle for the link preview image.
showDescriptionbooleanWhether to show the description in the link preview.
showImagebooleanWhether to display the image in the link preview.
showTitlebooleanWhether to show the title in the link preview.
showCancelbooleanWhether to show a cancel button for the link preview.
onCancelFunctionFunction to execute when the cancel button is pressed.
cancelButtonCancelButtonObject to customize the cancel button (see table below).

CancelButton Object

PropertyTypeDescription
textLMTextPropsCustomization for the text in the cancel button.
iconLMIconPropsCustomization for the icon in the cancel button.
onTapFunctionFunction triggered when the cancel button is tapped.
placementstart or endPosition of the icon or text in the cancel button.
buttonStyleViewStyleStyle for the cancel button container.
isClickablebooleanDetermines if the cancel button is clickable.