ColorPicker ​

ColorPicker is a color selector supporting multiple color formats.

Basic usage ​

ColorPicker requires a string typed variable to be bound to v-model.

With default value
With no default value

Alpha ​

ColorPicker supports alpha channel selecting. To activate alpha selecting, just add the show-alpha attribute.

Predefined colors ​

ColorPicker supports predefined color options

Sizes ​

API ​

Attributes ​

NameDescriptionTypeDefault
model-value / v-modelbinding valuestring—
disabledwhether to disable the ColorPickerbooleanfalse
sizesize of ColorPickerenum—
show-alphawhether to display the alpha sliderbooleanfalse
color-formatcolor format of v-modelenum—
popper-classcustom class name for ColorPicker's dropdownstring—
predefinepredefined color optionsobject—
validate-eventwhether to trigger form validationbooleantrue
tabindexColorPicker tabindexstring / number0
aria-label a11y 2.7.2ColorPicker aria-labelstring—
idColorPicker idstring—
teleported 2.7.2whether color-picker popper is teleported to the bodybooleantrue
label a11y deprecatedColorPicker aria-labelstring—

Events ​

NameDescriptionType
changetriggers when input value changesFunction
active-changetriggers when the current active color changesFunction
focus 2.4.0triggers when Component focusesFunction
blur 2.4.0triggers when Component blursFunction

Exposes ​

NameDescriptionType
colorcurrent color objectobject
show 2.3.3manually show ColorPickerFunction
hide 2.3.3manually hide ColorPickerFunction
focus 2.3.13focus the picker elementFunction
blur 2.3.13blur the picker elementFunction

Source ​

Component • Style • Docs

Contributors ​