asafefe.dev

Glow Card

A card with a radial glow that follows the cursor. Customizable glow color.

utils
Move your cursorThe glow follows it

Installation

$ pnpm dlx shadcn@latest add @soultel/glow-card

No namespace set up? npx shadcn@latest add https://asafefe.dev/r/glow-card.json works too.

Manual installation
  1. 1. Copy the source from the Code tab into components/glow-card.tsx.

Usage

example.tsx9 lines
import { GlowCard } from "@/components/glow-card"

export function Example() {
  return (
    <GlowCard className="w-64">
      <div className="p-6">Hover me</div>
    </GlowCard>
  )
}

Props

PropTypeDefaultDescription
glowstring"var(--primary)"Glow color.
sizenumber280Glow diameter in px.