Installation
templui add sliderLoad the script once in your layout:
<head>
@slider.Script()
</head>Examples
Value
Steps
Disabled
External Value
External value (linked to the slider):
Range
API Reference
Slider
Single-thumb slider component.
| Name | Type | Default |
|---|---|---|
Unique identifier for the slider. Required when using the Value component. | | |
Additional CSS classes. | | |
Additional HTML attributes. | | |
Name attribute for the hidden form input. | | |
Minimum value. | | |
Maximum value. | | |
Step increment. | | |
Initial value. | | |
Whether the slider is disabled. | | |
Range
Dual-thumb range slider. Value displays use the slider ID with a -min or -max suffix.
| Name | Type | Default |
|---|---|---|
Unique identifier. Value components use {ID}-min and {ID}-max as their For value. | | |
Additional CSS classes. | | |
Additional HTML attributes. | | |
Name attribute for the min hidden input. | | |
Name attribute for the max hidden input. | | |
Minimum allowed value. | | |
Maximum allowed value. | | |
Step increment. | | |
Initial value for the min thumb. | | |
Initial value for the max thumb. | | |
Whether the slider is disabled. | | |
Value
Displays the current slider value. For range sliders use {sliderID}-min or {sliderID}-max as the For value.
| Name | Type | Default |
|---|---|---|
Unique identifier. | | |
Additional CSS classes. | | |
Additional HTML attributes. | | |
ID of the slider to link to. For range sliders append -min or -max. | | |