1. Components
  2. Input

Basic Forms

Tailwind CSS Range Slider

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.

Attention needed

By default Preline UI uses Tailwind CSS Forms plugin. Don't forget to install it!

Overview

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.

Disabled

Add the disabled boolean attribute on an input to give it a grayed out appearance, remove pointer events, and prevent focusing.

Min and Max

Range inputs have implicit values for min and max0 and 100, respectively. You may specify new values for those using the min and max attributes.

Steps

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".