Retro Cosmic Arcade uses two complementary animation layers: CSS keyframe animations registered through Tailwind for repeating ambient effects, and Framer Motion for all interactive gesture-driven motion. This page documents every animation in the project, the exact values used, and how to override, extend, or disable them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/retro-cosmic-arcade/llms.txt
Use this file to discover all available pages before exploring further.
Framer Motion is bundled as a local proxy module. Components import it as
m (for the motion factory) or named exports from ../assets/proxy.js rather than directly from the framer-motion package. If you add new animated components, use the same import path to avoid bundling a second copy of the library.CSS Animations
Two custom keyframe animations are defined inassets/main.css and compiled into Tailwind utility classes (animate-blink and animate-marquee) via the theme.extend.animation and theme.extend.keyframes source config blocks. Because the project ships as a compiled SPA, modifying these animations requires editing the source config and rebuilding with vite build.
animate-blink
A hard-cut opacity blink using step-end timing, which produces an instant on/off flash rather than a smooth fade. Used for the active navigation indicator dot to give it a classic blinking-cursor feel.
1s to a faster value (e.g. 0.5s) for a more frantic blink, or swap step-end for linear to get a smooth pulse instead of a hard cut.
animate-marquee
A continuous horizontal scroll that moves an element from the right edge of its container all the way to the left. Used by the MarqueeTicker component to produce a scrolling news-ticker banner.
40s) to slow the scroll down, or decrease it (e.g. 10s) to speed it up. Because the ticker element is wrapped in overflow-hidden, no clipping CSS changes are needed when adjusting the speed.
Framer Motion Animations
ChromeButton
TheChromeButton component wraps a <button> in a motion.button (imported as m.button) and applies micro-interaction scale transforms on hover and tap.
| Prop | Value | Effect |
|---|---|---|
whileHover | { scale: 1.05 } | Button grows slightly when the cursor enters |
whileTap | { scale: 0.95 } | Button shrinks on press, simulating physical click |
CursorTrail
TheCursorTrail component tracks mousemove events and renders up to 16 trailing particles using AnimatePresence. Each particle is a 2×2px cyan square with a glow shadow that fades out as it ages.
easeOut timing means the fade starts quickly and decelerates, making the trail feel energetic rather than mechanical.
Polaroid
ThePolaroid component is a fully draggable card. Framer Motion handles the drag physics, hover scale, and the initial rotation that staggers cards at different angles.
| Prop | Value | Effect |
|---|---|---|
drag | true | Enables free 2D drag on the card |
dragConstraints | { left: -50, right: 50, top: -50, bottom: 50 } | Limits drag travel to 50px in any direction from rest position |
whileHover | { scale: 1.05, zIndex: 50 } | Card lifts above siblings on hover |
whileDrag | { scale: 1.1, zIndex: 50, rotate: 0 } | Card scales up and snaps level while being dragged |
initial | { rotate: rotation } | Card mounts at a random rotation angle passed as a prop |
Customising Framer Motion Props
Override ChromeButton Scale
ChromeButton spreads extra props onto its motion.button, so you can override the defaults by passing your own whileHover and whileTap:
Change Polaroid Drag Constraints
Pass a newdragConstraints object to allow wider (or narrower) movement:
rotation prop to control the initial tilt angle. Positive values tilt clockwise, negative values tilt counter-clockwise.
Disabling Animations
- Polaroid
- CSS animations
Adding New Framer Motion Animations
Importmotion from the project’s proxy module and apply initial, animate, and transition props to any HTML element:
Choose your target element
Replace
motion.div with any HTML tag prefixed with motion. — motion.section, motion.li, motion.img, etc. Framer Motion wraps it transparently.Define initial and animate states
initial is the state the element mounts in. animate is the state it transitions to. Any CSS-compatible property (opacity, scale, x, y, rotate, etc.) can be interpolated.Tune the transition
duration is in seconds. Common ease values are 'easeOut' (fast start, slow finish — good for entrances), 'easeIn' (good for exits), and 'linear' (good for continuous loops). For spring physics, replace ease with type: 'spring' and add stiffness / damping values.