Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
atorres committed Sep 17, 2022
1 parent 0fbcb47 commit 25a1adb
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions projects/ngx-colors/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
![size](https://img.shields.io/bundlephobia/min/ngx-colors?style=for-the-badge)
![download](https://img.shields.io/npm/dm/ngx-colors?style=for-the-badge)

<p align="center">
<h1 align="center">ngx-colors</h1>
<p align="center">A beautiful color picker for angular that let you choose from a
color palette, using sliders (Hue, Lightness, Alpha sliders) or through text input(hex, rgba, hsla)
color palette, using sliders (Hue, Lightness, Alpha sliders) or through text input(hex, rgba, hsla)

</p>
</p>
Expand All @@ -12,19 +13,24 @@ color palette, using sliders (Hue, Lightness, Alpha sliders) or through text inp

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


## Preview

![example gif](https://raw.githubusercontent.com/KroneCorylus/ngx-colors/master/projects/ngx-color-examples/src/assets/img/example-gif.gif)

## Installation

#### Npm
```shell
npm install @angular/animations
```
#### Dependencies

##### ngx-colors < v3.1.0

Angular > v10.0.0 < 13.1.1

##### ngx-colors >= v3.1.0

Angular > v13.1.1

#### Npm

```shell
npm install ngx-colors
```
Expand All @@ -42,8 +48,11 @@ import { NgxColorsModule } from 'ngx-colors';
]
})
```

## 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.

Expand All @@ -52,10 +61,15 @@ This library is composed of two parts:
```html
<ngx-colors ngx-colors-trigger [(ngModel)]="color"></ngx-colors>
```

##### Or with Reactive Forms:

```html
<form class="example-form">
<ngx-colors ngx-colors-trigger style="display: inline-block; margin:5px;" [formControl]="colorFormControl"></ngx-colors>
<ngx-colors
ngx-colors-trigger
style="display: inline-block; margin:5px;"
[formControl]="colorFormControl"
></ngx-colors>
</form>
```

0 comments on commit 25a1adb

Please sign in to comment.