Define CSS keyframes
npm i tailwindcss-plugins -D
theme: {
keyframes: {
bounce: {
'0%, 100%': { 'transform': 'translateY(0)' },
'50%': { 'transform': 'translateY(-5px)' },
},
},
},
plugins: [
require('tailwindcss-plugins/keyframes'),
],
See the animations plugin to define animations using those keyframes.
theme: {
animations: {
spin: 'spin 4s linear infinite',
},
},
plugins: [
require('tailwindcss-plugins/animations'),
require('tailwindcss-plugins/keyframes/spin'),
],
theme: {
animations: {
shake: 'shake .5s',
},
},
plugins: [
require('tailwindcss-plugins/animations'),
require('tailwindcss-plugins/keyframes/shake'),
],