Anchor

Definition

<cst-anchor>
<sub-label />
<sub-help-icon />
</cst-anchor>

Example

<cst-anchor id="" title="" href="">
<sub-label text="" />
<sub-help-icon name="help" position="right" title="" link=""/>
</cst-anchor>

OR

<cst-element name="anchor" schema="" schema-prop="" value=""/>

Attributes

AttributeValueDescription
idstring typeIdentifier for component
titlestring typeTooltip
disabledboolean typeSpecifies if link has to be disabled.(aurelia ext attribute)
hrefstring typeUrl to redirect on link click.
classcst-mat-anchor
cst-mat-anchor-tooltip
cst-mat-anchor-tooltip-dark
Specifies class to be applied(Multiple classes can be given with space).

sub-label

string typeSpecifies text to display.

sub-help-icon

object typeSpecifies help icon to be displayed.
schemaobject type Specifies JSON schema.
schema-propstring type Specifies property to be used to pick schema.

Sub element attributes

sub-label

PropertyValueDescription
textstring typeSpecifies text to display.

sub-help-icon

PropertyValueDescription
namestring typeIcon name.
positionleft/rightPosition of the icon.
titlestring typeIcon tooltip
linkstring typeLink to be opened on click.

Schema Examples

Example1

let schema = {
type: "object",
properties: {
redirectTo: {
type: "string",
title:"Click Here",//= tooltip
cstAttr: {
elementName: 'anchor',
raw:{ //loop & add to element
disabled : true,
class:'',
href: '' //redirection link
},
subLabel: {
text: 'Click Here To Redirect'
}
subHelpIcon: {
name: '',
position: '',
title:'',
link:''
},
}
}
}
}
let schemaProp = 'redirectTo';
let finalSchema = schemaProp ? schema.properties[schemaProp] : schema;

Unit test Screenshots

Responsiveness Test Screenshots

Design Images

Demo link

Points

  • Shows anchor with given label, link and tooltip