# Magic card

A frosted card with a glow that follows the pointer.

Section: Effects / Light
Page: https://ui.heyramzi.com/components/magic-card
Import path: `@heyramzi/ui/effects/magic-card`

## Import

```ts
import { MagicCard } from "@heyramzi/ui/effects/magic-card";
```

## Demo

```svelte
<script lang="ts">
	import { MagicCard } from "@heyramzi/ui/effects/magic-card";
</script>

<div class="grid w-full gap-4 sm:grid-cols-2">
	<MagicCard>
		<p class="font-medium">Follows the pointer</p>
		<p class="text-muted-foreground text-sm">Move across the card and the glow tracks you.</p>
	</MagicCard>
	<MagicCard class="[--magic-card-glow:oklch(0.65_0.2_285)]" radius={300}>
		<p class="font-medium">Brand colour, tighter</p>
		<p class="text-muted-foreground text-sm">
			A custom property sets the colour, radius sets the reach.
		</p>
	</MagicCard>
</div>
```

## API

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `children` | `Snippet` |  | required |
| `glow` | `boolean` | `true` | Draw the pointer-following glow. Off leaves the frosted card and the hover edge. |
| `radius` | `number` | `500` | Glow radius in px. |
| `class` | `string` |  |  |
| `contentClass` | `string` |  | Classes for the padded box around the children. |
