Animated Gradient Text
An animated gradient background which transitions between colors for text.
Usage
Code
Update tailwind.config.js
Add the following animations to your tailwind.config.js
file.
/** @type {import('tailwindcss').Config} */module.exports = {theme: {extend: {keyframes: {gradient: {to: {backgroundPosition: "var(--bg-size) 0",},},},animation: {gradient: "gradient 8s linear infinite",},},},};
Props
Attribute | Type | Description | Default |
---|---|---|---|
children | React.ReactNode | The children passed into the component. | undefined |
className | string | The class name to be applied. | undefined |