Vuetify: [Feature Request] v-color-picker new prop to hide sliders / show swatches only ?

Created on 16 Apr 2020  路  10Comments  路  Source: vuetifyjs/vuetify

Problem to solve

In my use case, I'd like to enable the user to only pick a color among a predefined set of colors (aka. swatches) But there is no prop to remove these sliders :
image

Would it be possible to add this feature ?

From now on I did this :

<v-color-picker
  flat
  hide-canvas
  hide-inputs
  show-swatches/>

which result in this :

image

Proposed solution

Add a prop hide-sliders (or whatever the name) so that it can be hidden.

Then it would be possible to have a colorpicker that looks like this (if :swatches is defined of course or it displays the full list) :

image

VColorPicker feature

Most helpful comment

@ryo-gk
Yes. And if you hide the rgba too only the swatches remain.

All 10 comments

About design spec,
where is it good to place the color-preview?
I have now 2 ideas, and I want to hear your opinions.

Case1. just hide sliders.
image

Case2. arrange next to mode(rgba, hsla, hexa)
image

@ryo-gk
Is it mandatory to have a color preview ? I mean check the last image of my original post. there is a v and a border on the chosen color in the swatches.

@laurent-brisbois
Thank you for your quick reply.
You mean like below images if hide-sliders is true, is my understand right?
image

@ryo-gk
Yes. And if you hide the rgba too only the swatches remain.

Thanks, I'll take this one.

Great suggestion, I'll be watching this closely :) Let me know if I can help with the PR

@ryo-gk Are you still on it ? :)

I would like this too, only I would like to just show the swatches and the transparency slider.

Would love the prop: hide-sliders as well.
I am currently using the disabled prop, as it only seems to disable the sliders of the color picker. The sliders still show, but they are greyed out:
image

It seems that @ryo-gk PR is abondoned. That's why I have created a new PR https://github.com/vuetifyjs/vuetify/pull/12618 with almost the same changes as @ryo-gk did.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chriswa picture chriswa  路  3Comments

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments

itanka9 picture itanka9  路  3Comments

dschreij picture dschreij  路  3Comments

aaronjpitts picture aaronjpitts  路  3Comments