vue-tailwind-color-picker
v1.0.6
Published
Color picker for vue using tailwind2
Downloads
33
Readme
Vue Tailwind Color Picker
Color picker for vue using Tailwind v2.
Requires Tailwind
Live demo
Installation
$ npm install vue-tailwind-color-picker
Usage
<template>
<vue-tailwind-color-picker v-model="color" :swatches.sync="swatches" :hide-swatches="false" @change="changedColor" @addSwatch="swatchAdded" @deleteSwatch="swatchDeleted" />
</template>
<script>
import VueTailwindColorPicker from 'vue-tailwind-color-picker.vue'
export default {
components: {
VueTailwindColorPicker
},
data() {
return {
color: '#00FF00FF',
swatches: [
'#f94144',
'#f3722c',
'#f8961e',
'#f9c74f',
'#90be6d',
'#43aa8b',
'#577590',
'#22223b',
'#4a4e69',
'#c9ada7'
]
}
},
methods: {
changedColor(color) {
console.warn('Changed Color', color)
},
swatchAdded(color) {
console.log('Swatch Added', color)
},
swatchDeleted(color) {
console.log('Swatch Deleted', color)
}
}
}
</script>