Colorpicker
An Input that lets a user specify a color
# Alpha
# Representation
# Formatter
# API
Name | Description | Type | Values | Default |
---|---|---|---|---|
v-model | Binding value | Object (Color) | — | — |
representation | Representation of Saturation & Lightness values | String | triangle , square | "triangle" |
alpha | Allow color with transparency | Boolean | — | false |
color-formatter | Function to format color to a string for display in the button | Function | — | (color) => color.toString('hex') |
color-parser | Function to parse value to a color | Function | — | (color) => Color.parse(color) |
size | Vertical size of input and picker, optional | String | is-small , is-medium , is-large | — |
inline | Colorpicker is shown inline, button is removed | Boolean | — | false |
position | Optional, position of the colorpicker relative to the button | String | is-top-right , is-top-left , is-bottom-left | Bottom right |
open-on-focus | Open colorpicker on button focus | Boolean | — | false |
focusable | Colorpicker container can be focused | Boolean | — | true |
trap-focus | Trap focus inside the colorpicker. | Boolean | — | true |
close-on-click | Choose whether the Colorpicker should close after selecting a color | Boolean | - | true |
append-to-body | Append colorpicker dropdown to body (prevents event bubbling) | Boolean | — | false |
Any native attribute | — | — | — | — |
# Variables
You can use these variables to customize this component.
Name | Default |
---|---|
$colorpicker-radius | $dropdown-content-radius |
$colorpicker-hue-selected-stroke | $primary |
This page is open source. Noticed a typo or something's unclear?