@gametailors/ngx-colors
TypeScript icon, indicating that this package has built-in type declarations

2.7.0 • Public • Published

ngx-colors

This is a fork of ngx-colors, in order to support Angular 11.

Demo and documentation

https://ngx-colors.web.app/

Preview

example gif

Installation

Npm

npm install @angular/animations

Npm

npm install ngx-colors
Load the ngx-colors module in your app module:
import { NgxColorsModule } from 'ngx-colors';

@NgModule({
  ...
  imports: [
    ...
    NgxColorsModule
  ]
})

Overview and usage

This library is composed of two parts:

  1. ngx-colors-trigger: This directive can be applied to any html element turning it into a trigger that when clicked will open the color picker
  2. ngx-colors: This component is a premade button that will display the selected color.
Use it in your HTML template with ngModel:
<ngx-colors ngx-colors-trigger [(ngModel)]="color"></ngx-colors>
Or with Reactive Forms:
<form class="example-form">
    <ngx-colors ngx-colors-trigger style="display: inline-block; margin:5px;" [formControl]="colorFormControl"></ngx-colors>
</form>

Package Sidebar

Install

npm i @gametailors/ngx-colors

Weekly Downloads

1

Version

2.7.0

License

MIT

Unpacked Size

821 kB

Total Files

46

Last publish

Collaborators

  • jonasgt
  • bas.dado
  • christian.knaapen
  • ohokke