Overview
TheContact component provides:
- Form submission via Formspree
- Origin tracking (where user came from)
- Gamification achievement unlocks
- Smart user intent detection (anti-autoscroll)
- Session persistence for success state
- Error handling with retry options
File Location
Configuration
State Management
Form Fields
Visible Fields
Hidden Fields (Tracking)
Origin Tracking
Tracks where the user navigated from:Form Submission
Gamification Triggers
Achievement: “almost_talked”
Unlocked when user views the contact section with intent:Achievement: “took_courage”
Unlocked when user writes 50+ characters:Achievement: “first_contact”
Unlocked on successful submission (see form submission above).Success State
Error State
Back to Origin Navigation
Section Wrapper
Submit Button
Usage Example
Key Features Summary
| Feature | Description |
|---|---|
| Formspree | Third-party form handling |
| Origin tracking | Tracks CTA source and scroll position |
| Gamification | 3 unlockable achievements |
| Intent detection | Anti-autoscroll using dwell time + human interaction |
| Session persistence | Success state survives page refresh |
| Error recovery | Multiple retry options with helpful messaging |
Dependencies
@/components/Section- Layout wrapper@/components/ui/contactOrigin- Origin tracking utilities@/components/gamification/achievementsStore- Achievement system@/components/gamification/missionsStore- Mission system