Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/apursley2012/y2k-web/llms.txt

Use this file to discover all available pages before exploring further.

MarqueeText recreates the classic <marquee> HTML element — a staple of 1990s web design — using Framer Motion for smooth, hardware-accelerated animation instead of CSS. Rather than relying on the deprecated <marquee> tag or a CSS translateX keyframe, the component drives the scroll through Framer Motion’s animate API, which hands the animation off to the browser’s compositor thread for jank-free performance. The result is an infinitely looping text ticker styled with green-on-black retro terminal colours.

Props

text
string
required
The text content to scroll across the banner. Rendered as an inline block inside the overflow-hidden container.
speed
number
default:15
Animation duration in seconds for one full pass of the text across the viewport. A lower value means faster scrolling; a higher value produces a slower, more ambient crawl.

Import

import { M as MarqueeText } from '../components/Primitives.js';

Usage

<MarqueeText text="Welcome to my website! Under construction! Best viewed in 800x600!" />
<MarqueeText text="HOT NEWS: New project launched!" speed={8} />

Visual Style

The banner is a full-width, overflow-hidden <div> with the following appearance:
PropertyValueEffect
Backgroundbg-blackBlack terminal background
Text colourtext-retro-limeBright green — classic CRT phosphor
Fontfont-pixelPixel/bitmap typeface
Sizetext-xsSmall, dense ticker text
Borderborder-2 border-retro-limeGreen border matching the text colour
Paddingpy-2Vertical breathing room
The inner text node is an inline-block driven by a Framer Motion motion.div. It animates along the x-axis from x: "100%" (off the right edge) to x: "-100%" (off the left edge) with ease: "linear" and repeat: Infinity, producing a continuous loop at the pace set by speed.
Tune the speed prop to match the mood of your content:
  • speed={8}speed={10} — fast and urgent, great for “breaking news” or alert banners.
  • speed={15} (default) — balanced; readable without feeling rushed.
  • speed={20}speed={30} — slow and ambient, suits atmospheric background tickers or poetry.
If your text is much shorter or longer than a typical sentence, adjust speed proportionally so the reading pace stays comfortable.

Build docs developers (and LLMs) love