@omiu/color-picker
v0.0.6
Published
Color Picker
Downloads
26
Readme
ColorPicker
Color Picker
Import
import '@omiu/color-picker'
Or use script tag to ref it.
<script src="https://unpkg.com/@omiu/color-picker"></script>
Usage
<o-color-picker></o-color-picker>
API
Props
{
button?: boolean,
preview?: boolean,
opacity?: boolean,
hue?: boolean,
hex?: boolean,
rgba?: boolean,
hsla?: boolean,
hsva?: boolean,
input?: boolean,
clear?: boolean,
save?: boolean,
cmyk?: boolean,
default?: string,
swatches?: string[],
inline?: boolean,
strings?: {
save: string, // Default for save button
clear: string // Default for clear button
},
width?: string
}
默认属性
{
button: true,
preview: true,
opacity: true,
hue: true,
hex: true,
rgba: true,
hsla: true,
hsva: false,
input: true,
clear: true,
save: true,
cmyk: false,
default: '#07c160',
swatches: [],
inline: true,
strings: {
save: 'Save', // Default for save button
clear: 'Clear' // Default for clear button
}
}
Events
- init
- save
- change
- swatch-select