Giter VIP home page Giter VIP logo

ng2-slider-component's Introduction

ng2-slider-component

Status: GitHub license

Angular 2 slider component

Demo: http://bogdan1975.github.io/slider/

Dependencies

Install

You can get it on npm.

npm install ng2-slider-component

###IMPORTANT!

*.js files compiled for WebPack

If you use SystemJS, you have to use *.system.js files, they are compiled for SystemJS.

Fragment of SystemJS config:

packages: {

    ....
    
    'node_modules/ng2-slider-component': {
            main: 'ng2-slider.component.system.js',
            defaultExtension: 'system.js' 
    },
    
    .... 
    
}

Usage

<ng2-slider 
    min="6"
    max="23"
    startValue="9"
    endValue="21"
    stepValue="2"
    [normalHandlerStyle]="{ 'background-color': 'green'}"
    [slidingHandlerStyle]="{
          'border-radius': '9px',
          'background-color': 'red'
    }">
</ng2-slider>

Component

min, max

This attributes set range of possible values

value

This attribute set initial value and set simple mode. startValue and endValue will be ignored.

startValue

This attribute set initial floor value. Ignored in value was set case.

endValue

This attribute set initial ceil value and set range mode. Ignored in value was set case. In case of this attribute is not set, mode will be set to simple

stepValue

Attribute set step value

Default value: "1"

normalHandlerStyle, slidingHandlerStyle

This attributes set styles of slider handles in normal and sliding modes

Example:

<ng2-slider min="3"
    max="33"
    value="7"
    stepValue="1"
    [normalHandlerStyle]="{ 'background-color': 'blue'}"
    [slidingHandlerStyle]="{
          'border-radius': '9px',
          'background-color': 'orange'
    }" >
</ng2-slider>

Events

onRangeChanged

Event onRangeChanged fired when range was changed

ng2-slider-component's People

Contributors

bogdan1975 avatar tauqeer1 avatar

Watchers

James Cloos avatar  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.