Skip to content

API Reference

Components

Name
ColorPickerRoot.vue
ColorPickerCanvas.vue
ColorPickerEyeDropper.vue
ColorPickerInputHSB.vue
ColorPickerInputHSL.vue
ColorPickerInputRGB.vue
ColorPickerSliderAlpha.vue
ColorPickerSliderRed.vue
ColorPickerSliderGreen.vue
ColorPickerSliderBlue.vue
ColorPickerSliderHue.vue
ColorPickerSliderSaturation.vue
ColorPickerSliderLightness.vue

ColorPickerRoot.vue

PropsDefaultDescription
modelValue-null | string | ColorObject
defaultValue#B63DDAFFstring default color
formathexahex | hexa | hsl | hsla | hsv | hsva | object
stylingtailwindcsstailwindcss | vanillacss
disabled-boolean
class-string
ui-ThemeSlots
EmitDescription
update:modelValueEvent handler called when the color value changes.
valueCommitEvent handler called when the value changes at the end of an interaction.

ColorObject

ts
type ColorObject = {
  rgb: RGB
  rgba: RGBA
  hsl: HSL
  hsla: HSLA
  hsv: HSV
  hsva: HSVA
  hex: Hex
  hexa: Hexa
}

ThemeSlots

ts
type ThemeSlots {
  picker: {
    root: string
  },
  dropper: {
    base: string
  },
  shared: {
    thumb: string
  },
  canvas: {
    root: string
    area: string
  },
  slider: {
    root: string
    track: string
  },
  input: {
    group: string
    item: string
    label: string
    field: string
  },
  swatch: {
    base: string
    alpha: string
  }
}

ColorPickerCanvas.vue

PropsDefaultDescription
typeHSVHSV | HSL
height208number
width208number
wheeltrueboolean
class-string
ui-Canvas UI Slots

ColorPickerSlider*.vue

PropsDefaultDescription
orientationhorizontalhorizontal | vertical
class-string
ui-Slider UI Slots

ColorPickerSliderHue.vue

PropsDefaultDescription
invertedfalseboolean
orientationhorizontalhorizontal | vertical
class-string
ui-Slider UI Slots

ColorPickerInput*.vue

PropsDefaultDescription
class-string
ui-Slider UI Slots

ColorPickerSwatch.vue

PropsDefaultDescription
asbuttonstring
class-string
value-string
ui-Swatch UI Slots

Released under the MIT License.