Gradient Text
Text with an animated flowing gradient. Bring your own colors and speed.
utils
Ship faster
Installation
$ pnpm dlx shadcn@latest add @soultel/gradient-textNo namespace set up? npx shadcn@latest add https://asafefe.dev/r/gradient-text.json works too.
Manual installation
- 1. Copy the source from the Code tab into components/gradient-text.tsx.
- 2. Add the keyframes it uses (gradient-flow) to your global CSS. The CLI does this for you.
Usage
import { GradientText } from "@/components/gradient-text"
export function Example() {
return <GradientText className="text-3xl font-bold">Ship faster</GradientText>
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| colors | string[] | - | Gradient stops. Repeat the first at the end for a seamless loop. |
| speed | number | 6 | Seconds per sweep. |
