Skip to main content

Image

Overview

LMImage is a customizable image rendering component used to display images within the application. It provides flexibility for adjusting how images are displayed, including options for different resizing modes and additional props. This component supports common image sources such as URLs and local resources, making it versatile for displaying images in various contexts like posts, galleries, or carousels.

LMFeedPostContent

Callbacks

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

Customisation

PropertyTypeDescription
heightnumberHeight of the image.
widthnumberWidth of the image.
imageStyleImageStyleStyle for the image.
boxFitcenter or contain or cover or repeat or stretchDefines how the image should be fitted in the box.
boxStyleViewStyleStyle for the container (box) that holds the image.
aspectRatio0 or 0.1 or 0.2 or 0.3 or 0.4 or 0.5 or 0.6 or 0.7 or 0.8 or 0.9 or 1Aspect ratio of the image.
loaderWidgetReact.ReactNodeCustom loader widget to show while the image is loading.
errorWidgetReact.ReactNodeCustom error widget to show if the image fails to load.
showCancelbooleanWhether to show a cancel button for the image view.
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.