Socket
Socket
Sign inDemoInstall

ember-cli-nouislider

Package Overview
Dependencies
224
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-cli-nouislider

Ember range-slider component powered by nouislider


Version published
Maintainers
1
Install size
13.4 MB
Created

Changelog

Source

1.0.0 2018-04-28 - My First Decade on GitHub

  • Remove deprecated change & slide properties
  • Use nouislider's ability to just remove all event listeners, instead of tediously keeping track

Readme

Source

ember-cli-nouislider

Build Status npm version Code Climate Ember Observer Score Open Source Helpers

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 has no external dependencies).

To get started simply install the addon:

$ ember install ember-cli-nouislider

(This addon supports Ember 1.13 and up. It might work on older versions, but this is guaranteed.)

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

You have the opportunity to customize if needed.

To do this, 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;

Include the slider into your views like this:

{{range-slider start=someValue on-change=(action "changedAction")}}

And setup an action handler in your route:

// app/routes/my-route.js
import Controller from '@ember/controller';
import { debug } from '@ember/debug';

export default Controller.extend({
  // ...
  actions: {
    // ...
    changedAction: function(value) {
      debug( `New slider value: ${value}`);
    }
  }
});

See the documentation for more actions.

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, or browse through the documentation.

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
  • cd ember-cli-nouislider
  • yarn install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

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

License

This project is licensed under the MIT License.

Keywords

FAQs

Last updated on 28 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc