Skip to main content
Version: v4

Icon Button

Overview

This element uses Icon element and Label element to show text and icon(with background) and along with an alignment property to align the icon around the text. The purpose of this element is to initiate an action.

Properties

NameTypeDescription
textstringText to appear on the element
hoverTextstringText to appear on the element on mouseover
iconURLstringAsset URL of the icon to be displayed on the element
alignmentIconButtonAlignmentGroup of constants representing the alignment options
disabledbooleanWhen set to true, prevents the user from interacting with the button: it cannot be pressed or focused.
buttonStyleobjectStyling properties and values of the element

Events

Events triggered by the element

NameDescription
cc-button-clickedEvent triggered when user clicks on the element

Usage

<cometchat-icon-button
[text]="'text'"
[alignment]="alignment"
[hoverText]="'hoverText'"
[iconURL]="myCustomIcon"
(cc-button-clicked)="clickHandler($event)"
></cometchat-icon-button>