Glow badge
Small pill badge with an organic breathing pulse and cursor-mapped pastel glow border. Variants for success, warning, and error override the colour while keeping the same physics.
- requestAnimationFrame
- Sine Wave
- pastelColour
glow-badge
ActiveShippedPendingFailedDisabled
Move your cursor near the badges.
Usage
Drop it in
import { GlowBadge } from "@/app/lib/components/glow-badge";<GlowBadge>Active</GlowBadge>
<GlowBadge variant="success">Shipped</GlowBadge>
<GlowBadge variant="error" pulse={false}>Failed</GlowBadge>API
Props
| Prop | Type | Default |
|---|---|---|
children* | ReactNode | — |
variantColour variant — default follows cursor, others use fixed accent colours | "default" | "success" | "warning" | "error" | "default" |
pulseEnable organic breathing pulse animation | boolean | true |
classNameAdditional class names | string | "" |
Read from the component's source at build time. * required.
Accessibility
Works with
- Cursor
- Reacts to where the pointer is, not just whether it's over the element.
- Touch
- Follows your finger while it's down, then settles a moment after you lift.
- Keyboard
- Focus lights it up the way the cursor does. Every action has a key.
- Reduced motion
- Nothing moves or springs. Colour still answers, without drifting.