Skip to main content

Card Bubble

The CometChatCardBubble component is used to display a card within a chat bubble. The card includes an image, text, and action buttons. It helps to offer action-oriented chat experiences, like booking a flight, ordering food, scheduling a meeting, etc., directly in the chat.

Properties

MethodsParametersDescription
messageCardMessageAn instance of the CardMessage class which holds information about the card such as image URL, text, and action buttons.
cardBubbleStyleCardBubbleStyleAn instance of the CardBubbleStyle class for customizing the appearance of the card bubble.
loggedInUserUserAn instance of logged in user
onActionTapFunction(BaseInteractiveElement interactiveElement)call back to perform custom action on tap of any button element
themeCometChatTheme

CardBubbleStyle

CardBubbleStyle is a class extending BaseStyle containing attributes to customize the appearance of the card in the CometChatCardBubble component.

PropertiestypeDescription
gradientGradientUsed to set Background of wrapper in card bubble
borderRadiusdoubleUsed to set borderRadius of wrapper in card bubble
borderBoxBorderUsed to set the border of the card bubble.
backgroundColorUsed to set the background color of the card.
heightdoubleUsed to set the height of card bubble.
widthdoubleUsed to cset the width of the card bubble.
buttonStyleButtonElementStyleUsed to customize the styling of buttons in the card.
textStyleTextStyleUsed to customize the text style for the content in the card.

Usage

CometChatCardBubble(
cardMessage: cardMessage,
)