BlogPlaygroundOne

VColorPicker API


Props
name
type
default
string
undefined

Applies specified color to the control’s background. Used on components that also support the color prop. - supports utility colors with or without bg- prefix (for example success, purple or bg-purple) or CSS color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

string | number | boolean
false

Applies utility border classes to the component. To use it, you need to omit the border- prefix, (for example use border-sm as border="sm"). Find a list of the built-in border classes on the borders page.

string | number
150

Height of canvas.

string
undefined

Applies specified color to the control - supports utility colors with or without text- prefix (for example success, purple or text-purple) or CSS color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

boolean
false

Removes the ability to click or target the component.

boolean
false

Adds a divider between the header and controls.

string | number
10

Changes the size of the selection dot on the canvas.

string | number
undefined

Designates an elevation applied to the component between 0 and 5. You can find more information on the elevation page.

  | string
  | (new () => any)
  | FunctionalComponent
  | (string | [string, number])[]
'$eyeDropper'

Icon used to trigger EyeDropper API.

string | number
undefined

Sets the height for the component.

boolean
false

Hides canvas.

boolean
false

Hides eyedropper icon.

boolean
true

Hide the picker header.

boolean
false

Hides inputs.

boolean
false

Hides sliders.

boolean
false

Hide the picker title.

boolean
false

Puts the picker into landscape mode.

Anchor
undefined

Specifies the component’s location. Can combine by using a space separated string.

string | number
undefined

Sets the maximum height for the component.

string | number
undefined

Sets the maximum width for the component.

string | number
undefined

Sets the minimum height for the component.

string | number
undefined

Sets the minimum width for the component.

'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hex' | 'hexa'
'rgba'

The current selected input type. Syncable with v-model:mode.

string | Record<string, unknown>
undefined

The v-model value of the component. If component supports the multiple prop, this defaults to an empty array.

('rgb' | 'rgba' | 'hsl' | 'hsla' | 'hex' | 'hexa')[]
['rgb', 'rgba', 'hsl', 'hsla', 'hex', 'hexa']

Sets available input types.

'fixed' | 'relative' | 'absolute' | 'static' | 'sticky'
undefined

Sets the position for the component.

boolean
false

Puts the color picker in a readonly state.

string | number | boolean
undefined

Designates the border-radius applied to the component. This can be 0, xs, sm, true, lg, xl, pill, circle, and shaped. Find more information on available border radius classes on the Border Radius page.

boolean
false

Displays color swatches.

(
  | string
  | number
  | {
      readonly h: number
      readonly s: number
      readonly v: number
      readonly a?: number | undefined
    }
  | {
      readonly r: number
      readonly g: number
      readonly b: number
      readonly a?: number | undefined
    }
  | {
      readonly h: number
      readonly s: number
      readonly l: number
      readonly a?: number | undefined
    }
)[][]
undefined

Sets the available color swatches to select from. 2D array of rows and columns, accepts any color format the picker does.

string | number
150

Sets the maximum height of the swatches section.

string | (new () => any) | FunctionalComponent
'div'

Specify a custom tag used on the root element.

string
undefined

Specify a theme for this component and all of its children.

boolean
false

Removes any applied border-radius from the component.

string
undefined

Specify a title text for the component.

string | number
undefined

Sets the width of the color picker.

Events
name
type
['rgb' | 'rgba' | 'hsl' | 'hsla' | 'hex' | 'hexa']

Selected mode.

[any]

Event that is emitted when the component’s model changes.

SASS Variables