1.0.3 • Published 1 year ago

mini-range-slider v1.0.3

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

MiniRangeSlider

MiniRangeSlider is a small, lightweight slider component for Alipay mini programs that allows users to select a range of values within a specified minimum and maximum range. It features a customizable design and a variety of callback functions that can be used to interact with the slider.

Installation

You can install MiniRangeSlider via npm:

npm install mini-range-slider

Usage

To use Mini Range Slider, simply import the component and add it to your page:

<mini-range-slider
  trackWidth="{{400}}"
  handleSize="{{24}}"
  trackSize="{{6}}"
  min="{{0}}"
  max="{{100}}"
  backgroundColor="{{'#EAEAEA'}}"
  activeColor="{{'#3880FF'}}"
  onFromCallback="{{onFromCallback}}"
  onToCallback="{{onToCallback}}"
/>

Properties

PropertyTypeDefaultDescription
trackWidthNumber0The width of the slider track.
handleSizeNumber18The size of the slider handles.
trackSizeNumber3The size of the slider track.
minNumber0The minimum value of the slider.
maxNumber100The maximum value of the slider.
backgroundColorStringlightblueThe background color of the slider track.
activeColorStringblueThe active color of the slider track.
onFromCallbackFunctionnullThe callback function for the from handle.
onToCallbackFunctionnullThe callback function for the to handle.

License

MiniRangeSlider is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.

Credits

MiniRangeSlider was created by Abraham Yonas. You can find me on GitHub.