🏹 Lume Card
LumeCard is a sleek, interactive card component that brings your UI to life with smooth hover animations, dynamic scaling, and elegant motion effects. Designed for React & Tailwind CSS, it adds a touch of sophistication to any project—whether you're showcasing products, portfolios, or feature highlights. With its subtle glassmorphic overlay and responsive design, LumeCard ensures your content shines effortlessly.
Preview
Follow below steps 👇🏻
Install dependencies
1npm i framer-motion
Component
Create a file lume-card.tsx in your components folder and paste this code
1import { useState } from 'react';2import { motion } from 'framer-motion';34type LumeCardProps = {5title?: string;6paragraph?: string;7image?: string;8className?: string;9};1011const LumeCard = ({ title, paragraph, image, className }: LumeCardProps) => {12const [isExpanded, setIsExpanded] = useState(false);1314return (15<div className={`w-full max-w-[250px] sm:max-w-sm md:max-w-md ${className}`}>16{/* Card */}17<motion.div18className="relative w-full h-[250px] rounded-2xl overflow-hidden shadow-lg cursor-pointer"19onMouseEnter={() => setIsExpanded(true)}20onMouseLeave={() => setIsExpanded(false)}21initial={{ scale: 1 }}22animate={{ scale: isExpanded ? 1.05 : 1 }}23whileTap={{ scale: 0.98 }}24transition={{ duration: 0.6, ease: 'backOut' }}25>26{/* Background Image */}27<motion.div28className="absolute inset-0 bg-cover bg-center"29style={{ backgroundImage: `url(${image})` }}30initial={{ scale: 1 }}31animate={{ scale: isExpanded ? 1.15 : 1 }}32transition={{ duration: 0.8 }}33></motion.div>3435{/* Subtle Overlay */}36<motion.div37className="absolute inset-0 bg-white/10 backdrop-blur-md rounded-2xl border border-white/10"38initial={{ opacity: 0.3 }}39animate={{ opacity: isExpanded ? 0 : 0.5 }}40transition={{ duration: 0.5 }}41></motion.div>42</motion.div>4344<motion.h245className="mt-2 text-white sm:text-lg md:text-2xl font-bold tracking-wide"46initial={{ opacity: 0 }}47whileInView={{ opacity: 1 }}48viewport={{ once: true }}49transition={{ duration: 0.2 }}50>51{title}52</motion.h2>5354{/* Paragraph Below the Card */}55<motion.div56className="text-white/60 text-sm sm:text-base opacity-90"57initial={{ opacity: 0, y: 10 }}58whileInView={{ opacity: 1, y: 0 }}59viewport={{ once: true }}60transition={{ duration: 0.6, delay: 0.2 }}61>62{paragraph}63</motion.div>64</div>65);66};6768export default LumeCard;
Usage
1<LumeCard2title="Explore Beyond Borders"3paragraph="The world is full of hidden gems waiting to be discovered. Where will your next adventure take you?"4image="https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"5/>
⭐️ Got a question or feedback?
Feel free to reach out!