Skip to content

Conversation

@Yeom-JinHo
Copy link
Contributor

Description

This PR extends the existing MagicCard implementation without changing its public behavior.
It introduces an additional visual variant (orb) while keeping the original gradient-based interaction as the default.

The original pointer-tracking gradient border + inner glow remains intact, and the new mode is implemented as an additive layer approach.

Changes

  • Add mode prop
    • mode="gradient" (default): preserves the existing behavior (no visual/API changes for current consumers)
    • mode="orb": adds an extra “orb glow” layer that follows the pointer
  • Add orb-only customization props
    • glowFrom, glowTo, glowAngle
    • glowSize, glowBlur, glowOpacity
  • Orb animation behavior
    • Uses useSpring to smooth pointer tracking
    • Uses an internal visibility spring to fade the orb in/out on pointer enter/leave
  • Theme-aware blend mode
    • Uses next-themes to adjust mixBlendMode for better visibility across dark/light backgrounds
  • Hydration guard for motion layer(s)
    • Adds suppressHydrationWarning on motion layers where motion/react style serialization can differ between SSR/CSR

Motivation

  • Keep the existing MagicCard as-is for all current usages.
  • Provide a more expressive “orb glow” option for marketing/hero-style cards without duplicating the component.

Breaking Changes

  • None.

Screenshots

Dark theme

2026-01-20.10.35.11.mov

Light theme

2026-01-20.10.35.53.mov

@vercel
Copy link

vercel bot commented Jan 20, 2026

@Yeom-JinHo is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

@Yeom-JinHo
Copy link
Contributor Author

@dillionverma
I’ve implemented some additional features on top of the awesome MagicCard you built🚀
If you have time, I’d really appreciate your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant