GithubHelp home page GithubHelp logo

jkuri / ngx-slider Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 4.61 MB

Angular customizable range slider

Home Page: https://codesandbox.io/s/jkuringx-slider-demo-d0k6h

License: MIT License

JavaScript 10.70% TypeScript 79.93% HTML 4.33% CSS 5.03%
angular ng slider range-slider range ui angular2

ngx-slider's Introduction

NgxRangeslider

Angular Range Slider as seen on Discord.

Demo

Installation

Using Angular CLI:

ng add @jkuri/ngx-slider

or

npm install @jkuri/ngx-slider

Then in your module:

import { NgxSliderModule } from '@jkuri/ngx-slider';

@NgModule({
  imports: [NgxSliderModule]
})

In your template:

<ngx-slider [(ngModel)]="fontSize" [values]="fontSizeValues" [options]="darkOptions"></ngx-slider>

And in your component (example):

import { SliderValue, SliderOptions } from '@jkuri/ngx-slider';

fontSize = 14;
fontSizeValues: SliderValue[] = [
  { value: 8, placeholder: '8px' },
  { value: 12, placeholder: '12px' },
  { value: 14, placeholder: '14px' },
  { value: 15, placeholder: '15px' },
  { value: 16, placeholder: '16px' },
  { value: 18, placeholder: '18px' },
  { value: 20, placeholder: '20px' },
  { value: 24, placeholder: '24px' }
];
darkOptions: SliderOptions = {
  gridColor: '#4F545C',
  dashColor: '#4F545C',
  dashMarkColor: '#4F545C',
  dashMarkSelectedColor: '#68d391',
  dashMarkFontWeight: 900,
  dashMarkFontSize: 12,
  dashMarkPadding: 12,
  barColor: '#ffffff'
};

License

MIT

ngx-slider's People

Contributors

jkuri avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ngx-slider's Issues

Angular 11 support

Hello,
Thanks a lot for making this repo, looks great.
Any plans to upgrade to Angular 11 anytime soon? Preferably, I'd like to avoid forks!

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.