Component: ColorField
A field for picking a color.
Inheritance
Inherits props from VAutocomplete
typescript
import ColorField from '@nhtio/vuetify-fields/components/fields/color'Examples
vue
<ColorField />Result
Reference
Props
| Name | Type | Default | Required |
|---|---|---|---|
modelValue | string | null | null | |
| The current color value. | |||
icon | string | "mdi-palette" | |
| The icon used to preview the color. | |||
emptyIcon | string | undefined | undefined | |
| The optional icon to use instead of the main icon when the value is empty. | |||
clearableViaBadge | boolean | false | |
| Allows the user to clear the color by clicking on the badge. | |||
Slots
btn-clear | |||||||||
| |||||||||
| The slot for the clear button. | |||||||||
Events
| Name | Type | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
update:modelValue | (val: string | null) => void | |||||||||
| Emitted when the value is changed. | ||||||||||
| ||||||||||
update:model-value | (val: string | null) => void | |||||||||
| Emitted when the value is changed. | ||||||||||
| ||||||||||
update | (val: string | null) => void | |||||||||
| Emitted when the value is changed. | ||||||||||
| ||||||||||