Deprecated, use core RangeSliderComponent instead
A simple module for creating range filter with slider.
or
- Download the module
- Copy the
RangeFilter.coffee
file to your prototype'smodules
folder. - Call
{RangeFilter} = require "RangeFilter"
in your Framer prototype.
priceyCoats = new RangeFilter
priceyCoats = new RangeFilter
from: 499
to: 2899
Call the goTo() method
priceyCoats.goTo(699, 1999)
Current values set at a filter are the object's keys ›bottom‹ and ›top‹
priceyCoats.on Events.PanEnd, ->
print priceyCoats.bottom
print priceyCoats.top
Set the range of your filter. Default ›from 1 to 100‹
from: 499
to: 2899
Initialize your filter with a custom active range. Default ›same as from/to‹. You can define none / one of these / both of these options.
bottom: 699
top: 2199
Set the color of the range bar (inactive/background)
backgroundColor: "rgba(239,244,244,1)"
Set the width of filter range bar. Default ›600‹
width: 500
Set the height of filter range bar. Default ›12‹
height: 8
Set the corner radius for the filter range bar. Default ›half of height‹
borderRadius: 0
Set the color of the active range.
activeRange: "rgba(0,0,0,0.6)"
Set the color of controller knobs.
knobColor: "rgba(239,242,242,1)"
Set the size of controller knobs. Default ›80‹
knobSize: 40
Set the corner radius of controller knobs. Default ›half of knobSize‹
knobRadius: 5
Set a border width of controller knobs. Default ›2‹
knobBorder: 1
Set the color of controller knobs' borders.
knobBorderColor: "rgba(0,0,0,0.2)"
Set the shadow color for controller knobs.
knobShadowColor: "rgba(201,203,203,0.3)"
Say if you want to show the text values above each knob. Default ›true‹
showValue: false
Set the color of text values above controller knobs.
valueColor: "rgb(130,130,130)"
Set the size of text value above controller knobs. Default ›"34 px"‹
valueSize: "20px"
Set the currency symbol in front of the text values. Default ›€‹
currency: "¥"