Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/press-start/llms.txt
Use this file to discover all available pages before exploring further.
PressStartGate is the first thing a visitor sees when they land on the portfolio. It renders a full-screen black overlay in the spirit of a classic arcade attract screen, displaying the “PLAYER ONE” headline and a pulsing “PRESS START” button. When the button is clicked, the gate plays a brief white-flicker exit animation and calls its onStart callback after a 600 ms delay, giving the opacity transition enough time to complete before the main app appears.
Props
Callback invoked after the exit animation finishes. The component sets
isExiting = true on click and schedules onStart() via
setTimeout(..., 600), matching the 300 ms CSS opacity transition plus a
safety margin.Usage
Visual elements
The component renders four distinct pieces of UI inside a centred flex column:| Element | Text | Styling |
|---|---|---|
| Headline | PLAYER ONE | font-press, text-arcade-green, glow-green, crt-rgb-split |
| CTA button | PRESS START | font-press, text-arcade-magenta, animate-pulse-fast |
| Sub-copy | INSERT COIN TO CONTINUE | font-vt323, text-arcade-muted |
| Credit line | CREDITS: 99 | font-vt323, smaller text-sm |
Behavior & state
The component owns a single boolean state value,isExiting, which starts as false.
- Button click —
handleStartsetsisExiting = trueand callssetTimeout(onStart, 600). - Opacity transition — The outer wrapper toggles between
opacity-100andopacity-0 pointer-events-nonedepending onisExiting, with atransition-opacity duration-300applied via Tailwind. - White flicker — When
isExitingistrue, a second absolutely-positioneddiv(bg-white animate-flicker mix-blend-screen z-50 pointer-events-none) is mounted on top of the overlay, simulating a CRT screen cut. - Handoff — After 600 ms the
onStartcallback fires and the parent is responsible for unmounting the gate.
fixed inset-0 z-50 bg-arcade-black, so it sits above everything else while active.
Keyboard accessibility
The button element receives afocus:ring-4 focus:ring-arcade-cyan outline and is the natural keyboard target on page load, so pressing Enter or Space also triggers the entrance sequence without mouse interaction.
The white flicker overlay uses
mix-blend-screen, which requires the
parent’s background to be non-transparent for the blend to be visible. The
bg-arcade-black on the wrapper ensures this. Users with
prefers-reduced-motion enabled will still see the opacity fade; only the
flicker keyframe is affected since it relies on the animate-flicker utility.