Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/retro-webpage/llms.txt
Use this file to discover all available pages before exploring further.
MarqueeBanner recreates the beloved (and once-deprecated) HTML <marquee> element using modern CSS animation. It renders a full-width announcement strip in a black background with lime-green VT323 terminal-style text that scrolls continuously from right to left. The component accepts a single text string and triples it internally so the scroll loop appears seamless — there is always visible copy on screen as the animation cycles.
Props
The announcement text to scroll. The component renders the string three times in sequence to create a seamless infinite loop. Aim for short, punchy copy — long strings may produce visible gaps at the wrap point.
Optional additional Tailwind or CSS class names applied to the outer wrapper
<div>. Use this to override spacing, positioning, or border styles without forking the component.Usage
With a custom className
Animation Details
The scrolling motion is driven by theanimate-marquee Tailwind utility, which maps to a custom keyframe:
className, or modify the keyframe in your Tailwind config.
DOM Structure
overflow-hidden div acts as the viewport mask. The inner inline-block div carries all three copies of the text and translates horizontally on the animation timeline.
The classic HTML
<marquee> tag is officially obsolete and should not be used. MarqueeBanner provides the same visual effect with a CSS animation that is accessible, performant, and respects prefers-reduced-motion when you add a motion-safe: variant to the animation class.CSS Classes
| Class | Description |
|---|---|
overflow-hidden | Clips text outside the banner viewport |
whitespace-nowrap | Prevents the text from wrapping to a second line |
bg-black | Solid black banner background |
text-retro-lime | Custom Tailwind colour — bright lime green terminal colour |
font-vt323 | VT323 monospace pixel font, evoking CRT terminal output |
text-2xl | 24 px base font size for high visibility |
border-y-2 border-retro-lime | Top and bottom lime borders framing the banner strip |
animate-marquee | Custom keyframe that translates the inner div from 100% to -100% over 15 s |