Magic Card

A spotlight effect that follows your mouse cursor and highlights borders on hover.

motion-sv
Login

Enter your credentials to access your account

Installation

pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/r/magic-card.json

Usage

<script lang="ts">	import { MagicCard } from "#lib/components/magic/magic-card/index.js";</script>
<MagicCard class="rounded-xl p-8">	Hover over this card</MagicCard>

Props

Magic Card

A component for Magic Card.

NameTypeDefaultDescription
childrenSnippetCard content.
classClassValue""Additional CSS classes.
gradientSizenumber200Size of the gradient circle.
gradientColorstring"#262626"Color of the gradient overlay.
gradientOpacitynumber0.8Opacity of the gradient overlay.
gradientFromstring"#9E7AFF"Starting color of the border gradient.
gradientTostring"#FE8BBB"Ending color of the border gradient.