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.

Image

Properties

MethodsParametersDescription
messageCardMessageAn instance of the CardMessage class which holds information about the card such as image URL, text, and action buttons.
cardBubbleStyle ?CardBubbleStyleAn instance of the CardBubbleStyle class for customizing the appearance of the card bubble.

CardBubbleStyle

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

MethodsTypeDescription
wrapperBackgroundstringUsed to set Background of wrapper in card bubble
wrapperBorderRadiusstringUsed to set borderRadius of wrapper in card bubble
descriptionFontstringUsed to set the font style of the description.
descriptionFontColorstringUsed to set the color of the description.
wrapperPaddingstringUsed to set the wrapperPadding of the card bubble.
buttonStyleanyUsed to customize the style of buttons.
imageHeightstringUsed to customize the height of the image in the card.
imageWidthstringUsed to customize the width of the image in the card.
imageRadiusstringUsed to customize the border radius of the image in the card.
imageBackgroundColorstringUsed to customize the background color of the image in the card.
dividerTintColorstringUsed to customize the tint of divider in card bubble
disabledButtonColorstringUsed to customize the color of button when disabled

Usage

<cometchat-card-bubble
message={message} //message: CardMessage
cardBubbleStyle={style} //style?: CardBubbleStyle
/>