Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zalari/md-color-slider

Simple Material design color slider directive for Angular.
https://github.com/zalari/md-color-slider

Last synced: 2 months ago
JSON representation

Simple Material design color slider directive for Angular.

Awesome Lists containing this project

README

        

# md-color-slider
Simple Material design color slider for [AngularJS](https://github.com/angular/angular.js) using [Material Design for AngularJS](https://github.com/angular/material/).
No jQuery or TinyColor dependencies.

![preview](https://raw.githubusercontent.com/zalari/md-color-slider/master/md-color-slider.png)

## Demo
Try the Demo on [Plunker](http://run.plnkr.co/UKGb9g2xz4vRiAiJ/).

## Install

### Bower:
```bash
bower install md-color-slider -S
```

## Usage
Include the stylesheet:
````html

````

Include the javascript:
````html

````

Add dependencies to your application (ngAnimate is optional)
````javascript
angular.module('myApp', ['ngMaterial','ngAnimate', 'mdColorSlider']);
````

Place the directive anywhere inside a ```md-input-container```:
````html

````
When using labels be sure to provide the css class ```md-icon-float``` to the ```md-input-container``` wrapper.

You can provide an classic input too:
````html

I'm labeled!

````

## Dependencies
- [Angular Material](https://material.angularjs.org)
- [ngAnimate](https://docs.angularjs.org/api/ngAnimate) (optional)