Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

🐛 fix: update magic card color

Dillion Vermaa07795a6d2e0
diff --git a/registry/components/example/magic-card-demo.tsx b/registry/components/example/magic-card-demo.tsx
index 1ffd6ff8..14bbca18 100644
--- a/registry/components/example/magic-card-demo.tsx
+++ b/registry/components/example/magic-card-demo.tsx
@@ -10,10 +10,7 @@ export default function MagicCardDemo() {
"flex h-[500px] w-full flex-col gap-4 lg:h-[250px] lg:flex-row"
}
>
- <MagicCard
- borderWidth={3}
- className="flex w-full cursor-pointer flex-col items-center justify-center overflow-hidden p-20 shadow-2xl"
- >
+ <MagicCard className="flex w-full cursor-pointer flex-col items-center justify-center overflow-hidden p-20 shadow-2xl">
<p className="z-10 whitespace-nowrap text-4xl font-medium text-gray-800 dark:text-gray-200">
Magic
</p>
diff --git a/registry/components/magicui/magic-card.tsx b/registry/components/magicui/magic-card.tsx
index 6572ac11..e9f920b6 100644
--- a/registry/components/magicui/magic-card.tsx
+++ b/registry/components/magicui/magic-card.tsx
@@ -189,39 +189,28 @@ const MagicCard: React.FC<MagicCardProps> = ({
children,
size = 600,
spotlight = true,
- spotlightColor = "rgba(120,119,198,0.1)",
- borderColor = "rgba(120,119,198,0.7)",
+ borderColor = "hsl(0 0% 98%)",
isolated = true,
...props
}) => {
return (
<div
- {...props}
- className={cn(
- "relative z-0 h-full w-full rounded-2xl p-6",
- "bg-gray-300 dark:bg-gray-700",
- "bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),hsl(var(--primary))_0,hsl(var(--secondary))_50%,transparent_100%)]",
- className,
- )}
style={
{
"--mask-size": `${size}px`,
- "--spotlight-color": `${spotlightColor}`,
"--border-color": `${borderColor}`,
} as CSSProperties
}
+ className={cn(
+ "relative z-0 h-full w-full rounded-2xl p-6",
+ "bg-gray-300 dark:bg-gray-700",
+ "bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),var(--border-color),transparent_100%)]",
+ className,
+ )}
+ {...props}
>
{children}
- {/* Spotlight */}
- {spotlight && (
- <div
- className={
- "pointer-events-none absolute left-0 top-0 h-full w-full transform-gpu rounded-2xl bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),var(--spotlight-color),transparent_40%)] blur-sm transition-opacity duration-500"
- }
- />
- )}
-
{/* Background */}
<div
className={