Cosmic Developer’s reusable building blocks all live insideDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/cosmic-developer/llms.txt
Use this file to discover all available pages before exploring further.
components/cosmos/ — a self-contained design system that blends ambient visual effects with practical layout primitives. Each component in this directory has a single, clearly scoped responsibility: either rendering part of the ambient environment (the starfield, aurora, cursor) or providing a structural element (the navigation bar, footer, page wrapper). This separation makes it easy to swap, extend, or disable any one component without affecting the others.
Components at a Glance
| Component | File | Purpose |
|---|---|---|
StarfieldBackground | StarfieldBackground.js | Animated canvas starfield; particle density scales with viewport area |
AuroraBackground | AuroraBackground.js | Four Framer Motion motion.div glow blobs on infinite looping animations |
CustomCursor | CustomCursor.js | Three-layer magnetic cursor with spring physics; expands over interactive elements |
TeletypeText | TeletypeText.js | Character-by-character typing reveal with a blinking aurora-teal caret |
PageTransition | PageTransition.js | Framer Motion motion.div wrapper; provides scale + blur enter/exit for every page |
Navigation | Navigation.js | Fixed top bar with logo, active-link indicator, and full-screen overlay nav menu |
Footer | Footer.js | Fixed bottom bar with telemetry copy and an animated rocket icon crossing the viewport |
Composition by Z-Index
Every cosmos component declares its own stacking context. Components are never nested inside each other in the DOM — they are siblings insideCosmiApp, stacked purely through CSS z-index and position: fixed. The complete layer order from back to front is:
pointer-events-none, so they never intercept clicks, taps, or keyboard events intended for page content.
The glass-panel Utility
The glass-panel class is the central design token that gives cards and panels their characteristic frosted appearance. It is defined in assets/main.css and used on most content surfaces across every page component:
glass-panel any time you need a surface that appears to float above the starfield without completely blocking the ambient light of the aurora behind it. The semi-transparent cosmic-navy background ensures readable contrast for text, while the aurora-teal border ties the panel visually into the color system.
For panels that need a different accent border, override only the border color using a Tailwind modifier. For example, the Skills page uses
border-aurora-green/20 and the Work page uses border-aurora-violet/20 to match each section’s color theme. The glass-panel class itself always provides the border shorthand, so your override just needs border-{color}/{opacity} — no need to repeat rounded-xl or backdrop-blur-md.Interactive Elements and Cursor Reactivity
CustomCursor tracks mouseover events and enlarges itself when the pointer enters any element that is:
- An
<a>tag - A
<button>tag - A descendant of
<a>or<button> - An element (or descendant of an element) carrying the
.interactiveclass
className="interactive" to any custom element that should trigger cursor expansion — for example, orbital project cards on the Projects page, skill constellation dots on the Skills page, and form inputs on the Contact page all use this class.
TeletypeText Props
TeletypeText is the only cosmos component with user-configurable props. It accepts three:
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | The full string to type out. Required. |
className | string | "" | Extra Tailwind classes applied to the outer <span>. |
delay | number | 0 | Seconds to wait before the typing animation starts. |
setInterval, and renders a blinking aurora-teal caret (motion.span with opacity: [1, 0] on a 0.5 s infinite loop) until the full string has been revealed.
StarfieldBackground
Canvas-based particle system. Density, speed, and twinkle rate explained.
AuroraBackground
Four animated glow blobs. Color tokens, blend modes, and timing configuration.
CustomCursor
Spring-physics cursor. The
.interactive class, scale factors, and layer layout.TeletypeText
Character-by-character reveal. Props reference and delay staggering patterns.
PageTransition
Framer Motion page wrapper. Enter/exit keyframes and the AnimatePresence contract.
Navigation
Fixed nav bar and overlay menu. The
navItems array and active-link detection.