Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-haunt/llms.txt
Use this file to discover all available pages before exploring further.
TrickOrTreatBag is the decorative illustration companion to the bio text on the About page. It renders a cream-colored trick-or-treat bag SVG with a pumpkin-orange handle and carved face. Hovering or tapping the bag triggers an animation that pops five personality-tag pills out of the bag like candy flying into the air. The component accepts no props and manages its own hover state.
Usage
Drop<TrickOrTreatBag /> anywhere — it is fully self-contained:
Interaction
The component uses auseState boolean (isOpen) that toggles on onMouseEnter, resets on onMouseLeave, and also flips on onClick for touch support. When isOpen is true:
- Each candy tag animates out of the bag via Framer Motion’s
AnimatePresence, springing upward and fanning out at different angles. - The bag itself scales up slightly and wobbles with a four-keyframe rotation sequence.
- A hint label beneath the bag switches from
"Hover or tap the bag"to"Sweet!".
Entrance Animation
The bag wrapper receives a Framer Motion scale entrance from the parent page:Candy Tags
Five personality tags are defined as a static array insideTrickOrTreatBag.js. Each tag has its own color, rotation angle, and stagger delay:
y) is calculated as -150 minus twice the absolute angle value, so more extreme angles fly higher out of the bag for a natural arc effect.
SVG Structure
The bag is drawn in aviewBox="0 0 200 200" coordinate space:
| Shape | Element | Description |
|---|---|---|
| Handle | <path> arc | Pumpkin-orange (#ff7a1a) rounded handle above the bag opening |
| Bag body | <path> trapezoid | Cream-colored (#f4f1ea) body widening from top to bottom |
| Left crease | <path> | Subtle shading line (#e0dcd3) on the left fold |
| Right crease | <path> | Subtle shading line on the right fold |
| Left eye | <polygon> triangle | Orange carved-face element |
| Right eye | <polygon> triangle | Orange carved-face element |
| Nose | <polygon> small triangle | Orange carved-face element |
| Smile | <path> arc | Curved orange grin at the bottom of the face |
Customization
Change the personality tags — Edit thecandies array directly in components/TrickOrTreatBag.js. Each entry needs an id, text, color (any valid CSS color), angle (degrees, negative = left lean), and delay (seconds):
y animation value controls how high pills travel. Increase the base offset from -150 to -200 for a more dramatic launch:
<TrickOrTreatBag /> in the About section of assets/main.js with a standard image tag:
Because
TrickOrTreatBag has no props, all visual customization requires editing the component source file directly. The component intentionally avoids a props API to keep the About page markup clean.#f4f1ea) and handle stroke (#ff7a1a) are hardcoded in the SVG <path> elements. To use a different palette, search for those hex values in components/TrickOrTreatBag.js and replace them: