Git Product home page Git Product logo

ember-cli-nouislider's Introduction

ember-cli-nouislider

Build Status npm version

This ember-cli addon provides you with a range-slider component, based on noUiSlider. It includes everything you need, and adds no extra dependencies other than noUiSlider itself (which only depends on jQuery, not jQueryUI).

To get started simply install the addon:

$ ember install:addon ember-cli-nouislider

This will install nouislider via Bower, and will include it into your application's mergetree, so you don't need to worry about anything there.

Demo & documentation

Have a look around then demo and documentation to get a feel for how to use it.

Component

Once the installation is done, you'll need to generate your own component and re-export the one provided:

$ ember g component range-slider
// app/components/range-slider.js
import RangeSlider from 'ember-cli-nouislider/components/range-slider';

export default RangeSlider;

You have the opportunity to customize if needed.

Include the slider into your views like this:

{{range-slider start=someValue change="changedAction"}}

And setup an action handler in your route:

// app/routes/my-route.js
import Ember from 'ember';

export default Ember.Route.extend({
  // ...
  actions: {
    // ...
    changedAction: function(value) {
      Ember.debug( "New slider value: %@".fmt( value ) );
    }
  }
});

Configuration

The component has a lot of configurable options, most of them mapping directly to the original options. To see how the slider is initialized internally, please have a look at app/components/range-slider.js in this project.

Contributing or running locally

This section outlines the details of collaborating on this Ember addon.

Installing dependencies

  • git clone https://github.com/kennethkalmer/ember-cli-nouislider
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

ember-cli-nouislider's People

Contributors

kennethkalmer avatar ember-tomster avatar

Watchers

Tim Williams avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.