Skip to main content

Icon

This element displays an icon. It currently supports only svg icons

Properties​

NameTypeDescription
namestringName of the element
URLstringAsset URL of the element
iconStyleIconStyleStyling properties and values of the element

IconStyle​

Styling properties and values of the element

NameDescription
widthSets the width of the element
heightSets the height of the element
iconTintSets the tint or color applied to the icon

Usage​

import '@cometchat/uikit-elements';//import the web component package.
import { iconStyle } from '@cometchat/uikit-elements';

const iStyle = new iconStyle({
width: "24px",
height: "24px",
iconTint: "lightgreen"
});

const iconURL = "https://img.icons8.com/?size=24&id=717&format=svg";

<cometchat-icon
:URL="iconURL"
:iconStyle="iStyle">
</cometchat-icon>