npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-noui-angular-slider

v1.0.2

Published

Angular wrapper component for noUiSlider library

Readme

ngx-noui-slider

Angular wrapper component of noUiSlider library.

Environment Support

  • Angular 9+

Installation

npm i ngx-noui-angular-slider --save

Demo

Stackblitz

Usage

Add css files to the styles section of your angular.json:

"styles": [
  ...
  "node_modules/nouislider/dist/nouislider.css",
  ...
],

Import NgxNouiSliderModule into the current module's imports:

import { NgxNouiSliderModule } from "ngx-noui-slider";

imports: [
  // ...
  NgxNouiSliderModule,
],

Use in your components (add html items into the ngx-glide component):

<ngx-noui-slider 
    [config]="config" 
    (onUpdate)="update($event)" 
    #nouislider>
</ngx-noui-slider>

You can pass configuration to the component instance:

import * as noUiSlider from 'noUiSlider';

@Component({
  ...
})

export class AppComponent {
config: noUiSlider.Options  = {
    range: {
      'min': 0,
      'max': 40
    },
    start: 20,
    margin: 2,
    step: 2
  };
}

You can access to the component menthods directly from the instance like this:

// Import from library
import { NgxNouiSliderComponent } from 'ngx-noui-slider';

@Component({
  ...
})

export class AppComponent {
    // Get the component instance similar.
    @ViewChild('nouislider', { static: false }) nouisliderRef: NgxNouiSliderComponent;

    doSomething(): void {
        this.nouisliderRef.get();
    }
}

API

Inputs

| Input | Type | Default | Description | | --------------------- | ----------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------ | | config| Object| null| You need to pass the configuration object of type noUiSlider.Options. You can get reference from the noUiSlider library

Outputs

| Output | Response Type | Response Properties* | Description | | -----------------| -------- | --------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | onStart| Object | values, handle, unencoded, tap, positions, noUiSlider | This event fires when a handle is clicked (mousedown, or the equivalent touch events). | | onSlide| Object | values, handle, unencoded, tap, positions, noUiSlider | This event is useful to specifically listen to a handle being dragged, while ignoring other updates to the slider value. This event also fires on a change by a 'tap'. In most cases, the 'update' is the better choice. | | onDrag| Object | values, handle, unencoded, tap, positions, noUiSlider | Use this event to listen for when a connect element between handles is being dragged, while ignoring other updates to the slider values.The handle in the callback is the first handle connected to the dragged connect. | | onUpdate| Object | values, handle, unencoded, tap, positions, noUiSlider | Use this event when synchronizing the slider value to another element, such as an <input>. It fires every time the slider values are changed, either by a user or by calling API methods. Additionally, it fires immediately when bound. In most cases, this event should be more convenient than the 'slide' event. | | onChange| Object | values, handle, unencoded, tap, positions, noUiSlider | This event is similar to the 'change' events on regular <input> elements. It fires when a user stops sliding, when a slider value is changed by 'tap', or on keyboard interaction.| | onSet| Object | values, handle, unencoded, tap, positions, noUiSlider | Whenever a slider is changed to a new value, this event is fired. This function will trigger every time a slider stops changing, including after calls to the .set() method. This event can be considered as the 'end of slide'. | | onEnd| Object | values, handle, unencoded, tap, positions, noUiSlider | This event is the opposite of the 'start' event. If fires when a handle is released (mouseup etc), or when a slide is canceled due to other reasons (such as mouse cursor leaving the browser window). |

Note: Events always fire in the following order: 'start' > 'slide' > 'drag' > 'update' > 'change' > 'set' > 'end'

For more info visit - noUiSlider Events

Response Properties*: values: Current slider values (array); handle: Handle that caused the event (number); unencoded: Slider values without formatting (array); tap: Event was caused by the user tapping the slider (boolean); positions: Left offset of the handles (array); noUiSlider: slider public Api (noUiSlider);

Interfaces

interface CssClasses {
    target: string;
    base: string;
    origin: string;
    handle: string;
    handleLower: string;
    handleUpper: string;
    touchArea: string;
    horizontal: string;
    vertical: string;
    background: string;
    connect: string;
    connects: string;
    ltr: string;
    rtl: string;
    textDirectionLtr: string;
    textDirectionRtl: string;
    draggable: string;
    drag: string;
    tap: string;
    active: string;
    tooltip: string;
    pips: string;
    pipsHorizontal: string;
    pipsVertical: string;
    marker: string;
    markerHorizontal: string;
    markerVertical: string;
    markerNormal: string;
    markerLarge: string;
    markerSub: string;
    value: string;
    valueHorizontal: string;
    valueVertical: string;
    valueNormal: string;
    valueLarge: string;
    valueSub: string;
}
interface API {
    destroy: () => void;
    steps: () => NextStepsForHandle[];
    on: (eventName: string, callback: EventCallback) => void;
    off: (eventName: string) => void;
    get: (unencoded?: boolean) => GetResult;
    set: (input: number | string | (number | string)[], fireSetEvent?: boolean, exactInput?: boolean) => void;
    setHandle: (handleNumber: number, value: number | string, fireSetEvent?: boolean, exactInput?: boolean) => void;
    reset: (fireSetEvent?: boolean) => void;
    options: Options;
    updateOptions: (optionsToUpdate: UpdatableOptions, fireSetEvent: boolean) => void;
    target: HTMLElement;
    removePips: () => void;
    removeTooltips: () => void;
    getTooltips: () => {
        [handleNumber: number]: HTMLElement | false;
    };
    getOrigins: () => {
        [handleNumber: number]: HTMLElement;
    };
    pips: (grid: Pips) => HTMLElement;
}
// These options can be updated after initialization
interface UpdatableOptions {
    range?: Range;
    start?: StartValues;
    margin?: number;
    limit?: number;
    padding?: number | number[];
    snap?: boolean;
    step?: number;
    pips?: Pips;
    format?: Formatter;
    tooltips?: boolean | PartialFormatter | (boolean | PartialFormatter)[];
    animate?: boolean;
}

// Below options cannot be updated after initialization
interface Options extends UpdatableOptions {
    range: Range;
    connect?: "lower" | "upper" | boolean | boolean[];
    orientation?: "vertical" | "horizontal";
    direction?: "ltr" | "rtl";
    behaviour?: string;
    keyboardSupport?: boolean;
    keyboardPageMultiplier?: number;
    keyboardDefaultStep?: number;
    documentElement?: HTMLElement;
    cssPrefix?: string;
    cssClasses?: CssClasses;
    ariaFormat?: PartialFormatter;
    animationDuration?: number;
}
enum PipsMode {
    Range = "range",
    Steps = "steps",
    Positions = "positions",
    Count = "count",
    Values = "values"
}
enum PipsType {
    None = -1,
    NoValue = 0,
    LargeValue = 1,
    SmallValue = 2
}

interface Range {
    min: SubRange;
    max: SubRange;
    [key: string]: SubRange;
}

Collaborators

Mahir Shaikh - GitHub Prafull Nikose - GitHub