HoangJK / nativescript-range-seek-bar

A NativeScript Range Seek Bar widget.
Apache License 2.0
10 stars 13 forks source link

NativeScript Range Seek Bar

A NativeScript Range Seek Bar widget.

Based on

TTRangeSlider for iOS

Crystal Range Seekbar for Android

Installation

Run tns plugin add nativescript-range-seek-bar

API

Events

@Component({ selector: "ns-app", templateUrl: "app.component.html", })

export class AppComponent {

public rangeSeekBarProp = {
    minValue: 0,
    maxValue: 100,
    minStartValue: 0,
    maxStartValue: 100,
    minRange: 0,
    step: 1
};

constructor() { }

rangeSeekBarChanged(event: RangeSeekBarEventData) {
    console.log("rangeSeekBarChanged: ", event.value);
}

rangeSeekBarFinalValue(event: RangeSeekBarEventData) {
    console.log("rangeSeekBarFinalValue: ", event.value);
}

}

## Demos
This repository includes both Angular and plain NativeScript demos. In order to run those execute the following in your shell:
```shell
$ git clone https://github.com/HoangJK/nativescript-range-seek-bar.git
$ cd nativescript-range-seek-bar/src
$ npm install
$ npm run demo.ios

This will run the plain NativeScript demo project on iOS. If you want to run it on Android simply use the .android instead of the .ios sufix.

If you want to run the Angular demo simply use the demo.ios.ng.