# Usage
WARNING
Tailwind CSS must be installed in your project
and
WARNING
Day.js must be installed in your project
# Vuejs
if you have used component packages from vue, this will be very easy for you.
<template>
<div>
<VueTailwindPicker
@change="(v) => checkin = v"
>
<input type="text" v-model="checkin" />
</VueTailwindPicker>
</div>
</template>
<script>
export default {
components: {
VueTailwindPicker
},
data(){
return {
checkin: '',
}
}
}
</script>
# Nuxtjs
You can create plugin inside plugins directory e.g v-tailwind-picker.js or you just import at component.
import Vue from 'vue'
import VueTailwindPicker from 'vue-tailwind-picker'
Vue.use(VueTailwindPicker)
then add to nuxt.config.js
{
plugins: [
'~/plugins/v-tailwind-picker'
]
}
<template>
<VueTailWindPicker
:init="false"
@change="(v) => value = v">
<input v-model="value" placeholder="Example initial value">
</VueTailWindPicker>
</template>
// ...
<script >
export default {
components: { VueTailWindPicker: () => import('vue-tailwind-picker'), },
data(){
return {
value: ''
}
},
// ...
}
</script>
← Get started Props →