h2qutc / angular-material-components

Angular Material Library provide extra components for every project
https://h2qutc.github.io/angular-material-components/
MIT License
332 stars 167 forks source link

Can I show the colorpicker without Input? #178

Open nck974 opened 3 years ago

nck974 commented 3 years ago

Hello i would like to just select a color without displaying the hex value. Is that possible?

                       <mat-form-field>
                            <input matInput  [ngxMatColorPicker]="picker" placeholder="Color" formControlName="color" [disabled]="false">
                            <ngx-mat-color-toggle matSuffix [for]="picker" ></ngx-mat-color-toggle>
                            <ngx-mat-color-picker #picker [color]="setColor()" ></ngx-mat-color-picker>
                          </mat-form-field>

Something like this but I have tried some options like css invisible, block and width and height 0 but will not work,

demiro commented 3 years ago

I was about to ask the same thing... I would like to make it without bound input field... if I just hide it, then the picker sticks to position left:0, top: 0, and not under the toggle

actually I would like an example of multi picker on the page... let's say there is a table with rows of data, and you would want to put color picker end of each row to set the background color of that row

also would be good to have examples on how to customize the picker (how to add apply button for one)

ferily7 commented 3 years ago

Wondering the same thing too.. I just want to show the mat-color-toggle and when you click on it, it pops the colorpicker. @h2qutc Is there any way to do this?