Download src/components/ui/gradient-text.tsx from felix-fx/fx-1: direct link, hf CLI and curl.
- Browser
- Download file 932 Bytes
-
https://huggingface.co/felix-fx/fx-1/resolve/main/src/components/ui/gradient-text.tsx
- Command line
-
hf download hf://felix-fx/fx-1/src/components/ui/gradient-text.tsx
-
curl -L -o gradient-text.tsx https://huggingface.co/felix-fx/fx-1/resolve/main/src/components/ui/gradient-text.tsx
932 Bytes
| import { ReactNode } from "react"; | |
| import { cn } from "@/lib/utils"; | |
| interface GradientTextProps { | |
| children: ReactNode; | |
| className?: string; | |
| variant?: 'primary' | 'accent' | 'rainbow' | 'neon'; | |
| } | |
| export const GradientText = ({ children, className, variant = 'primary' }: GradientTextProps) => { | |
| const variants = { | |
| primary: "bg-gradient-to-r from-primary via-primary-glow to-accent bg-clip-text text-transparent", | |
| accent: "bg-gradient-to-r from-accent via-cyan-400 to-blue-500 bg-clip-text text-transparent", | |
| rainbow: "bg-gradient-to-r from-red-500 via-yellow-500 via-green-500 via-blue-500 to-purple-500 bg-clip-text text-transparent animate-gradient-shift", | |
| neon: "bg-gradient-to-r from-cyan-400 via-blue-500 to-purple-600 bg-clip-text text-transparent drop-shadow-[0_0_15px_rgba(0,255,255,0.5)]" | |
| }; | |
| return ( | |
| <span className={cn(variants[variant], className)}> | |
| {children} | |
| </span> | |
| ); | |
| }; |