Barricade Tape
BarricadeTape is a bold, no-nonsense banner that slides in like crime scene tape, making sure your message can’t be ignored. Whether it’s a warning, an alert, or just some dev humor, this tape grabs attention and doesn’t let go. It swoops in smoothly when in view—because important messages deserve a grand entrance.
Preview
Follow below steps 👇🏻
Install dependencies
1npm i framer-motion
Component
Create a file barricade-tape.tsx in your components folder and paste this code
1import React from 'react';2import { motion } from 'framer-motion';34const BarricadeTape = ({5text,6delimiter,7rotation = -4,8entryFrom = 'left',9delay = 0,10duration = 2,11ease = 'backOut',12className13}: {14text: string | Array<string>;15delimiter: string;16rotation?: number;17entryFrom?: 'left' | 'right';18delay?: number;19duration?: number;20ease?: string;21className?: string;22}) => {23let sentence = '';24if (typeof text === 'string') sentence = Array(10).fill(text).join(delimiter);25else sentence = Array(10).fill(text.join(delimiter)).join(delimiter);2627return (28<motion.div29initial={{30transform: `translateX(${entryFrom === 'left' ? '-50vw' : '50vw'}) rotateZ(${rotation}deg)`,31scale: 1,32y: -533}}34whileInView={{35transform: `translateX(0) rotateZ(${rotation}deg)`,36y: 0,37scale: [1.1, 1],38transition: { duration, ease, delay }39}}40viewport={{ once: true }}41className={`text-black font-bold text-3xl md:text-5xl w-screen flex items-center justify-center gap-5 h-[50px] md:h-[80px] bg-yellow-500 overflow-hidden whitespace-nowrap border-[5px] md:border-[10px] border-black border-dashed ${className}`}42>43{sentence}44</motion.div>45);46};4748export default BarricadeTape;
Usage
1<EndToEndBanner2text={['BUILD QUICK', 'COPY PASTE']}3delimiter={'•'}4entryFrom="right"5rotation={10}6className="bg-yellow-400 mt-2"7/>
⭐️ Got a question or feedback?
Feel free to reach out!