Skip to main content
Version: v4

Label

Overview

This element provides descriptive information about the associated UI element.

Properties

NameTypeDescription
textstringDescriptive text associated with the UI element
labelStyleLabelStyleStyling properties and values of the element

LabelStyle

Styling properties and values of the element

NameDescription
widthSets the width of the element
heightSets the height of the element
borderSets the border of the element
borderRadiusSets the border radius of the element
backgroundSets all background style properties at once, such as color, image, origin and size, or repeat method. Reference link
textFontSets all the different properties of font for the descriptive text. Reference link
textColorSets the foreground color of the descriptive text.

Usage

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

const lStyle = new labelStyle({
textFont: "italic 1.2em 'Fira Sans'"
});

//make use of the element; pass a custom style
<cometchat-label :text="Hello World!" :labelStyle={lStyle}></cometchat-label>