Created
February 12, 2023 20:45
-
-
Save aluissp/df3fb9bd5d67f08e18ff47e3bd512c26 to your computer and use it in GitHub Desktop.
Fade in animation in Tailwind CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @type {import('tailwindcss').Config} */ | |
module.exports = { | |
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], | |
theme: { | |
extend: { | |
animation: { | |
fade: 'fadeIn .5s ease-in-out', | |
}, | |
keyframes: { | |
fadeIn: { | |
from: { opacity: 0 }, | |
to: { opacity: 1 }, | |
}, | |
}, | |
}, | |
}, | |
plugins: [], | |
}; |
Nice 👍
So how do I use this?
So how do I use this?
See https://tailwindcss.com/docs/animation#customizing-your-theme
After you extend the tailwind config, you can add the animate-fade
class to a div (in addition to the built-ins like animate-ping
, animate-pulse
, etc.).
nice, i get it
Thank you!
Great. Thank you 🤩
good things, Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1