Epic Name Drop
Meet EpicNameDrop, the ultimate Framer Motion-powered name reveal component for your portfolio. This sleek animation makes a bold statement—your name enters dramatically from the top, shifts left to reveal your last name, and then seamlessly scales down into position. Perfect for personal branding, it captivates visitors with smooth, eye-catching motion. Whether you're a developer, designer, or creative professional, EpicNameDrop ensures your name stands out—literally. 🚀
Preview
StackBits
Best Snippets Best Snippets
Best Snippets Best Snippets
StackBits
Best Snippets
Follow below steps 👇🏻
Install dependencies
1npm i framer-motion
Component
Create a file epic-name-drop.tsx in your components folder and paste this code
1'use client';23import { useEffect, useRef } from 'react';4import { motion, useAnimationControls } from 'framer-motion';56type EpicNameDropProps = {7name: string;8className?: string;9designationClassName?: string;10designation?: string;11};1213const EpicNameDrop = ({14name,15designation,16designationClassName,17className18}: EpicNameDropProps) => {19const controls = useAnimationControls();20const designationControls = useAnimationControls();21const designationRef = useRef<HTMLParagraphElement | null>(null);2223useEffect(() => {24(async () => {25if (!designationRef.current) return;2627const width = designationRef.current?.offsetWidth;2829await Promise.all([30controls.start('start'),31designationControls.start({32y: '-100%',33x: `-${width}px`,34transition: {35duration: 1,36ease: 'backOut'37}38})39]);40await Promise.all([41controls.start('enter'),42designationControls.start({43y: 0,44x: `-${width}px`,45transition: {46duration: 1,47ease: 'backOut'48}49})50]);51await Promise.all([52controls.start('slide'),53designationControls.start({54y: 0,55x: `${width}px`,56transition: {57duration: 2,58ease: 'linear'59}60})61]);62await Promise.all([controls.start('exit'), designationControls.start('exit2')]);63controls.start('textEntry');6465return () => controls.stop();66})();67}, [designationRef]);6869return (70<div71className={`h-full w-full flex flex-col flex-nowrap whitespace-nowrap overflow-hidden items-center justify-center relative`}72>73<motion.div74initial={{75y: '-100%',76x: '70%'77}}78variants={{79start: {80y: '-100%',81x: '70%',82transition: {83duration: 1,84ease: 'backOut'85}86},87enter: {88y: 0,89x: '70%',90transition: {91duration: 1,92ease: 'backOut'93}94},95slide: {96y: 0,97x: '-150%',98transition: {99duration: 1.4,100ease: 'linear'101}102},103exit: {104display: 'none'105}106}}107animate={controls}108className="h-full w-full flex items-center justify-start absolute z-30"109>110<p className={`!text-[150px] font-extrabold ${className}`}>{name}</p>111</motion.div>112<motion.div113initial={{114y: '-100%',115x: `-2360px`116}}117variants={{118exit2: {119display: 'none'120}121}}122animate={designationControls}123className="h-full w-full flex flex-col items-center justify-between absolute z-30 py-[50px]"124>125<p ref={designationRef} className={`!text-[150px] font-extrabold ${designationClassName}`}>126{Array(2).fill(designation).join(' ')}127</p>128<p className={`!text-[150px] font-extrabold ${designationClassName}`}>129{Array(2).fill(designation).join(' ')}130</p>131</motion.div>132133{/* For the background just like in the preview,134you have to go to https://stackbits.dev/docs/prismaticHaze135and get that background in your project and then uncomment the code below */}136{/* <motion.div137initial={{138opacity: 0139}}140animate={{141opacity: 0.5,142transition: {143duration: 1,144delay: 5145}146}}147className="h-full w-full absolute"148>149<PrismaticHazeBackground>150<div className="h-full w-full"></div>151</PrismaticHazeBackground>152</motion.div> */}153154<div155className={`h-full absolute top-0 left-0 z-10 w-full flex flex-col flex-nowrap whitespace-nowrap overflow-hidden items-center justify-center`}156>157<motion.p158initial={{159opacity: 0,160y: '50px'161}}162variants={{163textEntry: {164opacity: 1,165y: 0,166transition: {167duration: 0.5,168ease: 'backOut'169}170}171}}172animate={controls}173className={className}174>175{name}176</motion.p>177<motion.p178initial={{179opacity: 0,180y: '50px'181}}182variants={{183textEntry: {184opacity: 1,185y: 0,186transition: {187duration: 0.5,188ease: 'backOut',189delay: 0.5190}191}192}}193animate={controls}194className={`text-xl ${designationClassName}`}195>196{designation}197</motion.p>198</div>199</div>200);201};202203export default EpicNameDrop;
Usage
1<EpicNameDrop2designation="Web Developer"3designationClassName="text-white opacity-10"4name="Samit Kapoor"5className="text-yellow-500 text-2xl sm:text-3xl md:text-4xl font-extrabold"6></EpicNameDrop>
⭐️ Got a question or feedback?
Feel free to reach out!