Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/digital-alchemy/llms.txt
Use this file to discover all available pages before exploring further.
SpellForm is used on the Contact (/contact) page, presented under the “Cast a Message” heading. It renders a max-w-lg form with three fields, an animated submit button, and a layered animation system tied to the message textarea: as the user types, Elder Futhark runic characters float upward above the form. On submission, the button shows a spinning Sparkles icon for 2 seconds, then switches to a success state with a 20-particle confetti burst.
The component takes no props.
Usage
Form Fields
Your True Name
- Input type:
text - Required: yes
- Placeholder:
"e.g. Merlin" - Styling:
border-b border-turquoise/30(bottom border only) — a minimal underline style
Astral Address (Email)
- Input type:
email - Required: yes
- Placeholder:
"merlin@avalon.com" - Styling: same bottom-border treatment
The Incantation (Message)
- Element:
<textarea rows={4}> - Required: yes
- Placeholder:
"Speak your purpose..." - Styling:
border border-turquoise/30 rounded-lg— a full border (unlike the inputs above) - The textarea value is bound to controlled state
message— this is what drives the runic particle system
w-full bg-ink/50 px-4 py-3 text-parchment focus:outline-none focus:border-turquoise transition-colors font-serif text-lg placeholder:text-parchment/20.
Submit Button States
| State | Visual |
|---|---|
| Idle | "Cast Spell" — font-serif text-xl text-parchment tracking-wider group-hover:text-turquoise |
| Submitting | Rotating Sparkles icon (lucide-react), animate: { rotate: 360 }, transition: { duration: 2, repeat: Infinity, ease: "linear" } |
| Success | "Spell Cast Successfully" — font-serif text-xl text-turquoise tracking-wider |
disabled during both submitting and success states (opacity-50 cursor-not-allowed).
A shimmer gradient (bg-gradient-to-r from-transparent via-turquoise/20 to-transparent) sweeps across the button on hover via animate-[shimmer_1.5s_infinite].
Runic Particle System
As the user types in the message textarea, Elder Futhark runes float upward in the space above the form (absolute -top-32 h-32 pointer-events-none overflow-hidden).
The full rune set used:
- At 0 characters: no runes
- At 5 characters: 2 runes
- At 45+ characters: 10 runes (maximum)
AnimatePresence-managed motion.div:
Submission Flow
Confetti Burst Animation
On success, 20motion.div particles are rendered via AnimatePresence (the outer motion.div fades out after 1 s with a 1 s delay):
Form Container Styling
space-y-6 between fields and the relative z-10 (above the rune particle layer which is pointer-events-none) complete the layout.