npm i vue-petite-transition@1.1.2
it support some tailwindcss style like bg-blue-500 h-10 opacity-50 p-10, convert them into objects but to reduce size I had to remove that extra layer and thinking to back with this support but with a scalable solution for this . but 1.2.0 version is not supporting any tailwindcss, it's work as shown below 1.1.2 is compatible with 1.2.0 but 1.2.0 is not compatible with 1.1.2 sorry for that but !
v-state:show
v-state:enter
v-state:enter-from
v-state:enter-to
v-state:leave
v-state:leave-from
v-state:leave-to
you can provide the properties and their values which you want to animate also, it follows a perticular format to define your values like color-#FFF is going to convert into
{
color:#FFF;
}
<section>
<button @click="show=!show">Toggle Value</button>
<article v-state:enter="'duration-1000'" v-state:enter-from="'transform-scale(0.9) opacity-0.2'" v-state:enter-to="'transform-scale(1) opacity-1'" v-state:leave="'duration-1000'" v-state:leave-from="'transform-translateX(0px) backgroundColor-#FF00'" v-state:leave-to="'backgroundColor-#FFF transform-translateX(10px)'" x-state:show="show">
<div style="width:40px; height:40px" >I can do this all demo !</div>
</article>
</section>
npm i vue-petite-transition
yarn add vue-petite-transition
The short CDN URL is meant for prototyping. For production usage, use a fully resolved CDN URL to avoid resolving and redirect cost:
- ESM build:
https://unpkg.com/browse/vue-petite-transition@1.2.0/dist/vue-petite-transition.es.js
then in your html script where you defined your petite-vue instance
<script type="module">
import { createApp } from 'petite-vue'
import { state } from 'vue-petite-transition'
// register the directive
createApp().directive('state',state).mount()
</script>
Now Have Fun !