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.
ChromeButton is a Framer Motion–powered <button> element styled to resemble the beveled, raised buttons found in Windows 98 dialog boxes. It provides subtle hover and tap scale animations out of the box and forwards every extra prop directly to the underlying motion.button element, so the full Framer Motion animation API is available without any wrapper component.
Props
The button label or content. Rendered as the inner child of
motion.button.Additional Tailwind or custom CSS classes appended after the built-in
chrome-bg font-silkscreen px-4 py-1 text-sm uppercase tracking-wider transition-transform class string.Any prop valid on a Framer Motion
motion.button element — onClick, disabled, animate, variants, whileHover, whileTap, aria-*, and so on. The component spreads ...rest directly onto motion.button, so built-in whileHover and whileTap values can be overridden if needed.Usage
Basic button
Custom className
Append extra classes to adjust sizing, color, or spacing while keeping the chrome style:Overriding Framer Motion props
Because all extra props are spread ontomotion.button, you can override the default scale values or add entirely new animation variants:
Built-in animation values
| Gesture | Value |
|---|---|
whileHover | scale: 1.05 |
whileTap | scale: 0.95 |
Styling notes
Thechrome-bg CSS class is defined in the project’s global stylesheet and applies a bevel gradient that mimics the Win98 button appearance:
- Raised state — light top/left edges, dark bottom/right edges via
box-shadowinset. - Active state — the inset shadow inverts to simulate a pressed-in effect (
:activeor Framer MotionwhileTap). - Font —
font-silkscreenrenders text in the pixel-style Silkscreen typeface. - Text — forced
uppercasewithtracking-widerfor that classic OS label feel.
chrome-bg is not a Tailwind utility class — it is a custom CSS class defined in the project’s global CSS file. If you move ChromeButton to a different project, you must copy or recreate the chrome-bg rule.Dependencies
- Framer Motion (
motion.button,whileHover,whileTap) — must be installed as a peer dependency. - Silkscreen font — loaded via
font-silkscreenTailwind token.