Slider
Slider component is for displaying current values and intervals in a range, for the user to input the range.
Example
API Methods
setDisabled
Sets the button state using the boolean value
- Method
- Usage
setDisabled(disabled: boolean): void
// If it is set to true the Slider will not be interactable
a8forms.Slider("sliderId").setDisabled(true)
// If it is set to false the Slider is interactable
a8forms.Slider("sliderId").setDisabled(false))
setLabel
Sets the label of the field.
- Method
- Usage
setLabel(label: string): void
// Sets the field's label to 'My Text'
a8forms.SignaturePad("sliderId").setLabel('My Text')
setMaxValue
Sets the maximum value
- Method
- Usage
setMaxValue(value: number): void
// The maximum value the slider can slide to is 100
a8forms.Slider("sliderId").setMaxValue(100)
setMinValue
- Method
- Usage
setMinValue(value: number): void
// The minimum value the slider can slide to is 0
a8forms.Slider("sliderId").setMinValue(0)
setPrefix
It helps to identify the scope to which the message belongs.
- Method
- Usage
setPrefix(value: string): void
a8forms.Slider("sliderId").setPrefix("$")
setSize
Sets the size only using the parameters passed in.
- Method
- Usage
setSize(size: "small" | "medium" | "large"): void
//Sets the size to small
a8forms.Slider("sliderId").setSize("small")
//Sets the size to medium
a8forms.Slider("sliderId").setSize("medium")
//Sets the size to large
a8forms.Slider("sliderId").setSize("large")
setStepValue
StepValue specifies discrete intervals between the minimum and maximum values that the slider is allowed to represent. By default its value is 1.
- Method
- Usage
setStepValue(value: number): void
// The minimum value the slider can slide to is 0
a8forms.Slider("sliderId").setStepValue("50")
setSuffix
- Method
- Usage
setSuffix(value: string): void
a8forms.Slider("sliderId").setSuffix(".00")
setValue
Sets the value of a field.
- Method
- Usage
setValue(data: string): void
// Sets the value of a text field
a8forms.Slider("sliderId").setValue('A Text Value');
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.Slider("sliderId").setVisibility(true)
// setting the visibility false makes the element to not visible
a8forms.Slider("sliderId").setVisibility(false)
setVisibilityCondition
Sets the hide condition
- Method
- Usage
setVisibilityCondition(condition: string): void
// Hides the string
a8forms.Slider("sliderId").setVisibilityCondition("1 == 1");