Label
A label is used to describe a section in a website.
Example
API Methods
setLabel
Sets the label of the field.
- Method
- Usage
setLabel(label: string): void
// Sets the field's label to 'My Text'
a8forms.Label("labelId").setLabel('My Text')
setSize
Sets the size only by using the parameters passed in.
- Method
- Usage
setSize(size: "small" | "medium" | "large"): void
//Sets the size of the Checkbox to small
a8forms.Label("labelId").setSize("small")
//Sets the size of the Checkbox to medium
a8forms.Label("labelId").setSize("medium")
//Sets the size of the Checkbox to large
a8forms.Label("labelId").setSize("large")
setVisibility
Sets if elements of the given category is visible in this view.
- Method
- Usage
setVisibility(visible: boolean): void
// setting the visibility true makes the element to visible
a8forms.Checkbox("labelId").setVisibility(true)
// setting the visibility false makes the element to not visible
a8forms.Label("labelId").setVisibility(false)
setVisibilityCondition
Sets the hide condition
- Method
- Usage
setVisibilityCondition(condition: string): void
// Hides the string
a8forms.Label("labelId").setVisibilityCondition("1 == 1");