[ Effects ]
Spotlight Card
A Card with a soft radial glow that follows the cursor. It is a drop-in replacement for Card (same sub-components) and adds depth to feature grids and pricing tables.
2 examplesDark modeAccessible
Import#
import { SpotlightCard, CardHeader, CardBody, CardFooter } from 'reusify-ui';When to use#
- Marketing pages: feature grids, pricing plans, testimonials.
- Use sparingly in product UI. One highlighted area per screen is plenty.
Examples#
Feature grid#
Move your cursor over the cards. The glow uses --ru-primary by default.
Zero config
Import one stylesheet and go.
Dark mode
Every component, both themes.
30+ components
Forms, overlays, data and more.
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 16 }}>
{features.map((f) => (
<SpotlightCard key={f.title}>
<CardBody>
<f.icon />
<h3>{f.title}</h3>
<p>{f.text}</p>
</CardBody>
</SpotlightCard>
))}
</div>Custom glow color#
Pink spotlight
Hover me
Success spotlight
Hover me
<SpotlightCard color="#f472b6">
<CardBody>Pink spotlight</CardBody>
</SpotlightCard>
<SpotlightCard color="var(--ru-success)">
<CardBody>Success spotlight</CardBody>
</SpotlightCard>API reference#
<SpotlightCard />
Accepts every Card prop and <div> attribute. Use CardHeader, CardBody and CardFooter inside it.
| Prop | Type | Default | Description |
|---|---|---|---|
color | string | var(--ru-primary) | Glow color, any CSS color or variable. |
colorvar(--ru-primary)stringGlow color, any CSS color or variable.
Accessibility#
- The glow is purely decorative and drawn with a pseudo-element.
- Contrast of the text is unaffected; the glow stays below 16% opacity.