Class: LabelTitle

components~LabelTitle(text, description, labelAttributesopt, optionsopt)

A label to be used as form element title.

Constructor

new LabelTitle(text, description, labelAttributesopt, optionsopt)

Parameters:
Name Type Attributes Default Description
text string

The string to use as label.

description string

A string describing the form element.

labelAttributes object <optional>
{}

The parameters to consider as attributes for the HTML <label> element.

Properties
Name Type Attributes Description
htmlFor string <optional>

The id of the referred component.

options object <optional>
{}

Parameters considered to generate the component.

Properties
Name Type Attributes Description
bootstrap string <optional>

If given, it indicates the Bootstrap version which the component should be built for.

fontAwesome string <optional>

If given, it indicates the Font Awesome version which the component should be built for.

Implements:
Source:

Members

domElement :HTMLDivElement

Reference to the DOM object that contains the HTML structure of the component.

Type:
  • HTMLDivElement
Implements:
Source:

label :HTMLLabelElement

Reference to the DOM object representing the <label> element.

Type:
  • HTMLLabelElement
Source:

Methods

disable()

Disables the component.

Implements:
Source:

enable()

Enables the component.

Implements:
Source:

setLabelFor(htmlFor)

Sets the for attribute of the <label> element.

Parameters:
Name Type Description
htmlFor string

The id of the HTML element that the label should refer to.

Source: