Tabris.js Widgets: Slider

The purpose of the Slider widget is to allow the user to select a numeric value in the specified range. It looks like movable indicator on a horizontal line and works like input type="range" tag in HTML.

In JS syntax, simple Slider can be created using the following code:

And here is the same snippet in JSX syntax:

Notice that the slider values can be in the negative range, as long it is lying between -(253 -1) and (253 -1) to be precise. You can modify the widget values passing the exact numbers to it or just its minimum/maximum value. Try the example by scanning its QR code with your Tabris.js mobile app. Also, notice the tintColor attribute – it allows you to change the color of the selection area.

Check out the Slider documentation page to see the list of all available methods and properties.