JSFiddle - React, Tailwind, and code Playground
by khamer
HTML
<main>
<div class="box" :style="`transform: rotate(${rot}deg)`"></div>
<input type="number" step="15" v-model="rot">
</main>
CSS
main {
padding: 5em;
}
.box {
background: peru;
width: 100px;
height: 100px;
display: inline-block;
transition: transform 250ms;
}
JavaScript
new Vue({
el: 'main',
data: {
rot: 0,
},
});