0.0.3 • Published 5 years ago

@promact/ngx-material-colorpicker v0.0.3

Weekly downloads
2
License
-
Repository
-
Last release
5 years ago

ngx-material-colorpicker

Color picker component (based on angular material 7+)

Usage

npm install --save @promact/ngx-material-colorpicker

Import

import { ColorpickerModule } from 'ngx-material-colorpicker';

// In your App's module:
imports: [
   ColorpickerModule
]

Add in your HTML

<ngx-material-colorpicker [(ngModel)]="color"></ngx-material-colorpicker>

API

Properties

NameTypeDescription
disabledbooleanWhether or not the colorpicker is disabled
formatstringColor format:'hex', 'rgb', 'hsl'.Default :hex
idnumberThe unique ID of this colorpicker.
tabindexnumberThe tabIndex of the colorpicker.

Events

NameTypeDescription
changeEventFired when color is changed

Examples

A colorpicker would have the following markup.

<ngx-material-colorpicker [(ngModel)]="color"></ngx-material-colorpicker>
<ngx-material-colorpicker [(ngModel)]="color" format="hsla"></ngx-material-colorpicker>
<ngx-material-colorpicker [(ngModel)]="color" [disabled]="true"></ngx-material-colorpicker>

Developing

Change code in projects/ngx-material-colorpicker/src folder

Build library

npm run build:lib

Run demo

ng serve
0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago