Testimonial card with spotlight effect on hover.
Installation
Copy the Source Code
Copy and paste the following code into your project:
index.ts
testimonial-spotlight.svelte
Usage
usage.svelte
Features
- Wraps testimonial cards with a cursor-hover spotlight effect
- Customizable spotlight color, size, and opacity via CSS variables
- Composable with the base Testimonial component
Props
TestimonialSpotlight
Content container with a pointer-following radial spotlight.
| Name | Type | Default | Description |
|---|---|---|---|
children | Snippet | required | Content rendered inside the spotlight container. |
class | string | undefined | Additional classes applied to the spotlight container. |
ref | HTMLDivElement | null | null | Bindable reference to the spotlight container. |