Skip to content

Latest commit

 

History

History
39 lines (34 loc) · 4.03 KB

File metadata and controls

39 lines (34 loc) · 4.03 KB

:: BASE_DOC ::

API

ColorPicker Props

name type default description required
borderless Boolean false - N
clearable Boolean false - N
closeBtn String / Boolean / Slot / Function true Typescript:string | boolean | TNodesee more ts definition N
colorModes Array ["monochrome", "linear-gradient"] Typescript:Array<'monochrome' | 'linear-gradient'> N
disabled Boolean undefined - N
enableAlpha Boolean false - N
enableMultipleGradient Boolean true - N
format String RGB When enableAlpha is true, HEX8/RGBA/HSLA/HSVA are valid。options: HEX/HEX8/RGB/RGBA/HSL/HSLA/HSV/HSVA/CMYK/CSS N
inputProps Object - Typescript:InputPropsInput API Documentssee more ts definition N
multiple Boolean false - N
popupProps Object - Typescript:PopupPropsPopup API Documentssee more ts definition N
recentColors Array [] used color recently。.sync is supported。Typescript:boolean | Array<string> | null N
defaultRecentColors Array [] used color recently。uncontrolled property。Typescript:boolean | Array<string> | null N
selectInputProps Object - Typescript:SelectInputPropsSelectInput API Documentssee more ts definition N
showPrimaryColorPreview Boolean true - N
size String medium options: small/medium/large。Typescript:SizeEnumsee more ts definition N
swatchColors Array - swatch colors。Typescript:Array<string> | null N
value String - color value。v-model is supported N
defaultValue String - color value。uncontrolled property N
onChange Function Typescript:(value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }) => void
see more ts definition
type ColorPickerChangeTrigger = 'palette-saturation-brightness' | 'palette-saturation' | 'palette-brightness' | 'palette-hue-bar' | 'palette-alpha-bar' | 'input' | 'preset' | 'recent'
N
onPaletteBarChange Function Typescript:(context: { color: ColorObject }) => void
see more ts definition
interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; saturation: number; value: number; isGradient: boolean; linearGradient?: string; }
N
onRecentColorsChange Function Typescript:(value: Array<string>) => void
N

ColorPicker Events

name params description
change (value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }) see more ts definition
type ColorPickerChangeTrigger = 'palette-saturation-brightness' | 'palette-saturation' | 'palette-brightness' | 'palette-hue-bar' | 'palette-alpha-bar' | 'input' | 'preset' | 'recent'
clear (context: { e: MouseEvent }) -
palette-bar-change (context: { color: ColorObject }) see more ts definition
interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; saturation: number; value: number; isGradient: boolean; linearGradient?: string; }
recent-colors-change (value: Array<string>) -