Skip to main content
Version: v4

Receipt

The CometChatReceipt component renders the receipts such as sending, sent, delivered, read and error state indicator of a message.

Image

Properties

NameTypeDescription
waitIconstringAsset URL for the wait icon
sentIconstringAsset URL for the sent icon
deliveredIconstringAsset URL for the delivered icon
readIconstringAsset URL for the read icon
errorIconstringAsset URL for the error icon
receiptReceiptsGroup of constants representing the various receipt status

ReceiptStyle

NameDescription
waitIconTintSets the color applied to the wait icon
sentIconTintSets the color applied to the sent icon
deliveredIconTintSets the color applied to the delivered icon
readIconTintSets the color applied to the read icon
errorIconTintSets the color applied to the error icon

Usage

import '@cometchat/uikit-elements'; //import the web elements package
import { receipts } from '@cometchat/uikit-elements'; //import the receipts enum constant

//display the wait status icon
//use the element
<cometchat-receipt
waitIcon="https://cdn-icons-png.flaticon.com/24/661/661562.png"
sentIcon="https://cdn-icons-png.flaticon.com/24/1443/1443000.png" deliveredIcon="https://cdn-icons-png.flaticon.com/24/10728/10728652.png" readIcon="https://cdn-icons-png.flaticon.com/24/10728/10728588.png"
receipt={receipts.wait}
errorIcon="https://cdn-icons-png.flaticon.com/24/10207/10207468.png"></cometchat-receipt>