forms

Tailwind CSS Range

A range slider is used to modify a value by sliding a handle along a track, allowing for precise adjustments.

Class Name
Type
Description
rangeComponentRange input
range-primaryColorAdds ‘primary’ to range
range-secondaryColorAdds ‘secondary’ to range
range-accentColorAdds ‘accent’ to range
range-infoColorAdds ‘info’ to range
range-successColorAdds ‘success’ to range
range-warningColorAdds ‘warning’ to range
range-errorColorAdds ’error’ to range
range-xsSizeExtra small range
range-smSizeSmall range
range-mdSizeMedium (Default) range
range-lgSizeLarge range
range-xlSizeExtra Large range

Basic input range example.

The Range inputs are stacked in three sizes:extra small xs, small sm, default, and large lg.

The standard format for range is accompanied by the component class range and modifier class range-{semantic-color}.

Utilize [--range-color:] to incorporate your custom color.

Apply the disabled boolean attribute to a range input to disable pointer events and prevent focusing.

Range inputs inherently have default values for min and max - 0 and 100, respectively. You can customize these values using the min and max attributes.

The step attribute specifies the interval between legal numbers in an <input> element.