Cards Fancy Stable

CardSpotlight

Card whose radial-gradient spotlight tracks the cursor as it moves inside, fading in on hover and parking itself off-canvas when the pointer leaves, with configurable gradient size, color, and opacity

Preview

Installation

pnpm add fancy-ui-svelte
import { CardSpotlight } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { CardSpotlight } from 'fancy-ui-svelte';
</script>

<CardSpotlight />

Examples

Basic Usage

Custom Colors

Props

PropTypeDefaultDescription
slotClass string""CSS classes for the inner content wrapper
gradientSize number200Size of the spotlight gradient in pixels
gradientColor string"#262626"Color of the spotlight gradient
gradientOpacity number0.8Opacity of the spotlight gradient

Slots

SlotDescription
childrenCard content