BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/magicui/animated-gradient-text

Animated Gradient Text

magicui/animated-gradient-text
FreeComponent

An animated gradient background which transitions between colors for text.

Live preview

live · rendered by the registry
Rendered by magicui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://magicui.design/r/animated-gradient-text.json

Source

registry/magicui/animated-gradient-text.tsxmagicui.design/r/animated-gradient-text.json
1import { type ComponentPropsWithoutRef } from "react"
2
3import { cn } from "@/lib/utils"
4
5export interface AnimatedGradientTextProps extends ComponentPropsWithoutRef<"div"> {
6 speed?: number
7 colorFrom?: string
8 colorTo?: string
9}
10
11export function AnimatedGradientText({
12 children,
13 className,
14 speed = 1,
15 colorFrom = "#ffaa40",
16 colorTo = "#9c40ff",
17 ...props
18}: AnimatedGradientTextProps) {
19 return (
20 <span
21 style={
22 {
23 "--bg-size": `${speed * 300}%`,
24 "--color-from": colorFrom,
25 "--color-to": colorTo,
26 } as React.CSSProperties
27 }
28 className={cn(
29 `animate-gradient inline bg-linear-to-r from-(--color-from) via-(--color-to) to-(--color-from) bg-size-[var(--bg-size)_100%] bg-clip-text text-transparent`,
30 className
31 )}
32 {...props}
33 >
34 {children}
35 </span>
36 )
37}

Files it writes

  • registry/magicui/animated-gradient-text.tsx

Facts

Registry
magicui
Type
registry:ui
Access
Free
Files written
1
Theme wiring
ships cssVars
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on magicui magicui.design magicuidesign/magicui on GitHub Raw registry item This item as JSON

More from magicui

All 247 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AndroidandroidmagicuiComponentsFreeno deps
Animated Beamanimated-beammagicuiComponentsFree1 dep
Animated Circular Progress Baranimated-circular-progress-barmagicuiComponentsFreeno deps
Animated Grid Patternanimated-grid-patternmagicuiComponentsFree1 dep
Animated Listanimated-listmagicuiComponentsFree1 dep
Animated Shiny Textanimated-shiny-textmagicuiComponentsFreeno deps
Theme Toggleranimated-theme-togglermagicuiComponentsFree1 dep
Aurora Textaurora-textmagicuiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex