Gradient Shadow
paceui-gsap/gradient-shadowFreeComponent
Smooth horizontal gradient flow, creating a subtle glowing hover shadow effect.
Live preview
live · rendered by the registry
Rendered by PaceUI GSAP on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://gsap.paceui.com/r/gradient-shadow.jsonSource
1"use client";23import { ReactNode, useEffect, useRef } from "react";45import { gsap } from "gsap";67type GradientShadowProps = {8 colors?: string[];9 children: ReactNode;10};1112export const GradientShadow = ({13 colors = ["#3b82f6", "#8b5cf6", "#ec4899", "#f97316"],14 children,15}: GradientShadowProps) => {16 const shadowRef = useRef<HTMLDivElement>(null);1718 useEffect(() => {19 if (!shadowRef.current) return;20 gsap.to(shadowRef.current, {21 backgroundPosition: "200% 0%",22 duration: 6,23 ease: "linear",24 repeat: -1,25 });26 }, []);2728 const gradient = `linear-gradient(90deg, ${colors.join(", ")}, ${colors[0]})`;2930 return (31 <div className="group relative inline-block">32 <div33 ref={shadowRef}34 className="pointer-events-none absolute -inset-1 -z-10 scale-0 rounded-xl opacity-0 blur-sm transition-all duration-300 group-hover:scale-100 group-hover:opacity-100"35 style={{36 backgroundImage: gradient,37 backgroundSize: "300% 300%",38 backgroundPosition: "0% 0%",39 willChange: "background-position",40 }}41 />42 <div className="relative z-10">{children}</div>43 </div>44 );45};
What it pulls in
npm packages
Files it writes
More from PaceUI GSAP
All 29 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Modal Ability Selectorai-modal-ability-selector | PaceUI GSAP | Components | Free | 2 deps | |
| Modal Selectorai-modal-selector | PaceUI GSAP | Components | Free | 2 deps | |
| Response Writerai-response-writer | PaceUI GSAP | Components | Free | 2 deps · 2 files | |
| AI Suggestionsai-suggestions | PaceUI GSAP | Components | Free | 2 deps | |
| Modal Ability Selectorai-token-counter | PaceUI GSAP | Components | Free | 2 deps | |
| Animated Stackanimated-stack | PaceUI GSAP | Components | Free | 2 deps | |
| Bouncing Textbouncing-text | PaceUI GSAP | Components | Free | 2 deps | |
| Dot Flowdot-flow | PaceUI GSAP | Components | Free | 2 deps |
