feat(magicCard): extend with optional orb glow layer#880
feat(magicCard): extend with optional orb glow layer#880Yeom-JinHo wants to merge 13 commits intomagicuidesign:mainfrom
Conversation
|
@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. |
|
@dillionverma |
dillionverma
left a comment
There was a problem hiding this comment.
this PR looks amazing I love the new addition and how it looks
just added a couple small comments about the code types, otherwise it looks good to me to merge
| glowFrom?: never | ||
| glowTo?: never | ||
| glowAngle?: never | ||
| glowSize?: never | ||
| glowBlur?: never | ||
| glowOpacity?: never |
There was a problem hiding this comment.
any reason why we have these optional props here as never?
couldn't this be removed since it's already handled by the other interface?
There was a problem hiding this comment.
@dillionverma
I use never intentionally to forbid mode-specific props on the other branch of the discriminated union.
Without never, the union isn’t always strictly exclusive in TypeScript (e.g., with object spreads or values typed wider), so invalid prop combinations can slip through.
never improves DX by:
- making autocomplete mode-specific (no
glow*suggestions ingradientmode, nogradient*suggestions inorbmode), - producing a clear compile-time error if someone accidentally passes a prop for the wrong mode.
If I don’t care about that strictness, I can remove them, but I added never to enforce the API contract and avoid silent misuse.
…ead of backgroundImage
fc5e145 to
3c345c1
Compare
5b6615f to
59f8368
Compare
Description
This PR extends the existing
MagicCardimplementation 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
modepropmode="gradient"(default): preserves the existing behavior (no visual/API changes for current consumers)mode="orb": adds an extra “orb glow” layer that follows the pointerglowFrom,glowTo,glowAngleglowSize,glowBlur,glowOpacityuseSpringto smooth pointer trackingnext-themesto adjustmixBlendModefor better visibility across dark/light backgroundssuppressHydrationWarningon motion layers wheremotion/reactstyle serialization can differ between SSR/CSRMotivation
MagicCardas-is for all current usages.Breaking Changes
Screenshots
Dark theme
2026-01-20.10.35.11.mov
Light theme
2026-01-20.10.35.53.mov