1.0.0 • Published 7 years ago

ngx-material-color-picker v1.0.0

Weekly downloads
7
License
ISC
Repository
github
Last release
7 years ago

ngx-material-color-picker

npm npm

Unique material color picker concept for Angular (ngx). Requires a dependency for flex-layouts and material themeing/colors. Uses reactive forms to create a custom form control.

Example Image

  1. npm i ngx-material-color-picker --s
  2. Add NgxMaterialColorPickerModule to your feature module.
import { NgxMaterialColorPickerModule } from 'ngx-material-color-picker';

...
imports: [
    NgxMaterialColorPickerModule
]
...

Usage

<div [formGroup]="form">
    <ngx-material-color-picker formControlName="color" [intensity]="form.get('intensity').value"></ngx-material-color-picker>
    <md-slider max="900" min="100" step="100" tickInterval="100" formControlName="intensity"></md-slider>
</div>
form: FormGroup;

constructor(private fb: FormBuilder) { }

ngOnInit() {
    this.form = this.fb.group({
        color: [''],
        intensity: [500]
    });
}

Contributors

| :---: |Sean Perkins|