Documentation
Cardscardglowhover

Glow Card

A card with an animated glow border effect on hover.

Glow Card

Hover over this card to see the glow effect follow your cursor along the border.

Installation

Terminal
1npx shadcn@latest add "https://sniper-ui-coral.vercel.app/r/glow-card.json"

Auto-Installed Dependencies

The CLI will automatically install these packages.

Terminal
1npm install framer-motion clsx tailwind-merge

Usage

Basic

page.tsx
1import { GlowCard } from "@/components/ui/glow-card"; 2 3export default function MyPage() { 4 return ( 5 <GlowCard className="p-6"> 6 <h3 className="text-lg font-semibold">My Card</h3> 7 <p className="text-sm text-muted-foreground"> 8 Hover to see the glow. 9 </p> 10 </GlowCard> 11 ); 12}

Examples

examples.tsx
1import { GlowCard } from "@/components/ui/glow-card"; 2 3export default function MyPage() { 4 return ( 5 <div className="grid grid-cols-1 md:grid-cols-3 gap-4"> 6 <GlowCard> 7 <h3 className="font-semibold">Feature 1</h3> 8 <p className="text-sm text-muted-foreground"> 9 Lightning-fast build times. 10 </p> 11 </GlowCard> 12 <GlowCard> 13 <h3 className="font-semibold">Feature 2</h3> 14 <p className="text-sm text-muted-foreground"> 15 Type-safe by default. 16 </p> 17 </GlowCard> 18 <GlowCard className="md:col-span-1"> 19 <h3 className="font-semibold">Feature 3</h3> 20 <p className="text-sm text-muted-foreground"> 21 Edge-ready deployment. 22 </p> 23 </GlowCard> 24 </div> 25 ); 26}

Props

PropTypeDefaultDescription
childrenReact.ReactNodeThe card content.
classNamestringAdditional CSS classes for the outer wrapper.