Buttons
Futuristic neon glow effect with pulsing animation
Color variant
Changes the live preview, the copy-ready snippet, and the accent line at the bottom of the code block.
export function NeonGlowButton({ children, variant = 'blue', ...props }) {
const variants = {
cyan: 'bg-blue-500 text-blue-900 shadow-[0_0_20px_rgba(6,182,212,0.5),0_0_40px_rgba(6,182,212,0.3)] hover:shadow-[0_0_30px_rgba(6,182,212,0.8),0_0_60px_rgba(6,182,212,0.4)]',
pink: 'bg-blue-500 text-blue-900 shadow-[0_0_20px_rgba(236,72,153,0.5),0_0_40px_rgba(236,72,153,0.3)] hover:shadow-[0_0_30px_rgba(236,72,153,0.8),0_0_60px_rgba(236,72,153,0.4)]',
green: 'bg-blue-500 text-blue-900 shadow-[0_0_20px_rgba(34,197,94,0.5),0_0_40px_rgba(34,197,94,0.3)] hover:shadow-[0_0_30px_rgba(34,197,94,0.8),0_0_60px_rgba(34,197,94,0.4)]',
purple: 'bg-blue-500 text-blue-900 shadow-[0_0_20px_rgba(168,85,247,0.5),0_0_40px_rgba(168,85,247,0.3)] hover:shadow-[0_0_30px_rgba(168,85,247,0.8),0_0_60px_rgba(168,85,247,0.4)]',
};
return (
<button
className={`px-8 py-4 font-bold rounded-lg transition-all duration-300 ${variants[variant]}`}
style={{ animation: 'pulse 2s ease-in-out infinite' }}
{...props}
>
{children}
</button>
);
}
/* ── Live preview accent: "blue" (variant prop + Tailwind above) ── */No additional dependencies
Simply copy the code above and paste it into your project. Only React and Tailwind CSS are required.
Category
Buttons
Dependencies
None