Installation
You need to first install the @radix-ui/react-accordion
package to get started.
npm install @radix-ui/react-accordion
Tailwind Configuration
Then copy paste the following code into your tailwind.config.ts
file.
tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
extend: {
animation: {
"slide-down": "slide-down 300ms cubic-bezier(0.87, 0, 0.13, 1)",
"slide-up": "slide-up 300ms cubic-bezier(0.87, 0, 0.13, 1)",
},
keyframes: {
"slide-down": {
from: { height: "0px" },
to: { height: "var(--radix-accordion-content-height)" },
},
"slide-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0px" },
},
},
},
},
};