So I like to make transition whenever the element change it's height. It works on h-10, h-20, etc. But it doesnt work on h-min, h-max, h-auto.
<div id="botnav" className={`${isOpen ? 'h-min' : 'h-0'}
bg-primary
flex flex-col
transition-all duration-500 ease
`}>
{
menu.map((item, index) => {
return (
<Link href={item.link} key={index} className="">
<a className=" w-full px-1 py-1 text-white font-bold items-center justify-center border-none ">
{item.name}
</a>
</Link>
)
})
}
</div>
tailwind.config.js
module.exports = {
content: [
"./src/components/**/*.{js,ts,jsx,tsx}",
"./src/pages/**/*.{js,ts,jsx,tsx}",
],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {
colors: {
primary: {
DEFAULT: '#6558F5',
},
secondary: '#FED103',
container: {
100: '#E0E0E0',
200: '#C4C4C4'
}
},
gridTemplateColumns: {
title: '0.1fr 0.9fr'
},
transitionProperty: {
'height': 'height',
}
}
},
variants: {
extend: {}
},
}
```