Skip to main content

Carousel

Overview

The LMCarousel component is designed to display a horizontal carousel of media items. It allows users to swipe through images or videos effortlessly. The component supports various media formats and provides customization options for pagination, autoplay, and item styling, enhancing the user experience in applications that showcase multimedia content.

LMFeedPostContent

Callbacks

  • onCancel: Callback function triggered when the cancel button is clicked, receiving the index of the item.

Customisation

PropertyTypeDescription
carouselStyleViewStyleStyle for the carousel container.
paginationBoxStyleViewStyleStyle for the pagination box (where page indicators are shown).
activeIndicatorStyleViewStyleStyle for the active page indicator (e.g., active dot in pagination).
inactiveIndicatorStyleViewStyleStyle for the inactive page indicator (e.g., inactive dots in pagination).
showCancelbooleanWhether to show the cancel button for the carousel.
onCancelFunctionFunction to execute when the cancel button is pressed.
cancelButtonCancelButtonObject to customize the cancel button's properties (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.