Icon

  • Shows an icon based on the name passed in the schema.

Example Link

Features/Functionality

  • Shows an icon based on the name passed in schema.
  • Default font-size is '18px';
  • Gives Superscript and Subscript of icon.
  • On Hover of the icon, tooltip is shown.
  • Active icon is shown in different styles.
  • Label is shown if given based on positions given.
  • Custom tooltip is shown.
  • Click event callback will called on click.
  • Component is responsive.
  • It is cross browser compatible. (IE11, Edge, Firefox, chrome).

Basic Usage

Dependencies

Definition

<cst-s-icon schema.bind="${schema}"></cst-s-icon>

Schema Description

AttributeValueDescription
idstring typeIdentifier for component.
namestring typeName of icon to be shown.
labelstring typeLabel to show beside icon.
tooltipstring typeDescription to show on hover.
subscriptany typeSubscript to be shown.
superscriptany typeSuperscript to be shown.
isDisableboolean typeIf icon is disabled.
isActiveStateboolean typeIf icon is in active state or not.

options

object typeOptions for the component.
onClickstring typeMethod to be called on click of icon.
elmInstanceany typeIcon element instance.

subAccessCtrl

object typeAccess Ctrl for the component.

subTheme

object typeTheme for the component.

subFont

object typeFont for the component.

subStyle

object typeStyle for the component.

subRawAttributes

object typeRaw Attributes for the component.

options

PropertyValueDescriptionValue
iconShapebox/circle/noneShape of the background div of the icon.
iconShadedark/lightShade of the icon.
labelPositionbottom/top/left/rightPosition of label to be placed.
tooltipPositionbottom/top/left/rightPosition of custom tooltip to be shown.
activeStyleborder/filled/boxBorderTop/boxBorderBottom/boxBorderLeft/boxBorderRight/tabLeft/tabRight/tabBottom/tabTopStyle how active icon to be shown.

Schema Example

let schema = {
id: '',
name: '',
label: '',
tooltip: '',
subscript: '',
superscript: '',
isDisable: true/false,
isActiveState: true/false,
options: {
},
onClick: '',
elmInstance: '',
subAccessCtrl: {},
subTheme: {},
subFont: {},
subStyle: {},
subRawAttributes: {}
}