Basic Forms
The Slider component, a type of range input, offers a consistent and customizable way for users to select values within a defined range. This intuitive component is ideal for adjusting settings such as volume, brightness, or for applying filters in various applications.
By default Preline UI uses Tailwind CSS Forms plugin. Don't forget to install it!
Create custom <input type="range">
. The track (the background) and thumb (the value) of our Slider component are styled for a uniform appearance across browsers. Although Firefox uniquely offers a "fill" feature to visually indicate progress by filling the track from the left or right of the thumb, this specific attribute is not currently supported in our design.
Add the disabled
boolean attribute on an input to give it a grayed out appearance, remove pointer events, and prevent focusing.
Range inputs have implicit values for min
and max
β0
and 100
, respectively. You may specify new values for those using the min
and max
attributes.
By default, range inputs βsnapβ to integer values. To change this, you can specify a step
value. In the example below, we double the number of steps by using step="1"
.