Shine Button
ShineButton is a sleek, transparent button with a subtle diagonal shimmer effect. It features a smooth animated glow, a minimalist 1px border, and a modern hover interaction—perfect for adding a premium touch to your UI
Preview
Follow below steps 👇🏻
Install dependencies
1npm i framer-motion
Component
Create a file shine-button.tsx in your components folder and paste this code
1import { motion, MotionProps } from 'framer-motion';2import React from 'react';34type ShineButtonProps = {5className?: string;6children: React.ReactNode;7} & MotionProps;89const ShineButton: React.FC<ShineButtonProps> = ({ children, className, ...props }) => {10return (11<motion.button12{...props}13className={`relative overflow-hidden rounded-lg border border-neutral-700 px-6 py-3 text-white font-semibold transition-all duration-300 hover:border-neutral-400 hover:shadow-[0_0_10px_rgba(255,255,255,0.2)] active:scale-95 ${className}`}14whileHover={{ scale: 1.05 }}15>16<motion.span17className="absolute -left-full top-0 h-full w-[150%] blur-[6px] opacity-40"18initial={{ x: '-150%' }}19animate={{ x: '150%' }}20whileHover={{ opacity: 60 }}21style={{22background: 'linear-gradient(-55deg, transparent 40%, #ffffffbb 50%, transparent 60%)'23}}24transition={{25duration: 2,26repeat: Infinity,27ease: 'linear'28}}29/>3031<span className="relative z-10">{children}</span>32</motion.button>33);34};3536export default ShineButton;
Usage
1<ShineButton className="text-lg md:text-xl font-medium rounded-xl !px-5 sm:!px-10 py-4">2Shine3</ShineButton>
⭐️ Got a question or feedback?
Feel free to reach out!