Guide
Form Elements
Range Slider

RangeSlider Component

RangeSlider is a React component designed to create customizable input fields with options such as color, min max steps value, and more. It supports different sizes and colors along with disabled and checked states.

Example Preview

RangeSlider Example

Usage

import { RangeSlider } from "@/@core";
 
// ...
 
const MyComponent = () => {
  return (
    <Fragment>
      <RangeSlider color="primary" />
      <RangeSlider steps={25} />
      <RangeSlider disabled />
    </Fragment>
  );
};
 
export default MyComponent;

Props

Prop nameTypeDefault valueRequiredDescription
minnumber-NoNumber representing the minimum value of the slider.
maxnumber-NoNumber representing the maximum value of the slider.
stepsnumber-NoNumber representing the steps of the slider.
valuenumber-NoNumber representing the value of the slider.
colorprimary, secondary, error, success, warning, info, accent-NoString representing the color theme of the checkbox.
disabledboolean-NoBoolean indicating whether the checkbox is disabled.
sizexs, sm, md, lg-NoString representing the size of the checkbox.
classNamestring-NoAdditional class names for styling purposes.
propsHTMLAttributes<HTMLInputElement>-NoAdditional HTML attributes can be passed as well.

Styling

The component provides various styling options based on the color and size props. The label text size and color can be customized accordingly.

All Available Props

import { RangeSlider } from '@/@core';
 
// ...
 
const AllAvailableProps = () => {
   return (
      <Fragment>
         <RangeSlider
            color={/* 'primary' | 'secondary' | 'error' | 'success' | 'warning' | 'info' | 'accent' */}
            disabled={/* boolean */}
            size={/* 'xs' | 'sm' | 'md' | 'lg' */}
            min={/* number */}
            max={/* number */}
            steps={/* number */}
            value={/* number */}
            className={/* string */}
            /* Other HTML attributes for the input element */
          />
      </Fragment>
   );
};
 
export default AllAvailableProps;
ℹ️

Note: The RangeSlider component is inspired by the DaisyUI (opens in a new tab) framework. Check it out for more awesome components. But our RangeSlider component is dynamic and easy to use. It is also fully customizable.