Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/witch-dev/llms.txt
Use this file to discover all available pages before exploring further.
BackgroundEffects is a purely decorative, non-interactive background layer that sits beneath all page content at z-0. It combines three visual layers — a tiled pentagram SVG texture, animated fog blobs, and 40 floating acid-green particles — to build the atmospheric, otherworldly environment that defines witch-dev’s visual identity.
Layer composition
The component renders a singlefixed inset-0 container with pointer-events-none and overflow-hidden, ensuring no visual element ever captures clicks or extends beyond the viewport. Inside that container, three layers stack from bottom to top:
| Layer | Technique | Z-order |
|---|---|---|
| Pentagram tile | SVG data-URI background-image | Bottom |
| Fog blobs | Blurred div circles + CSS animation | Middle |
| Floating particles | Framer Motion motion.div elements | Top |
Pentagram tile
The lowest layer tiles a small pentagram SVG across the entire background using adata:image/svg+xml URI as a CSS background-image. The tile repeats at 200px × 200px intervals.
mix-blend-screen, the pattern is nearly subliminal — it adds subtle visual texture without competing with content or the brighter particle effects above it.
Fog blobs
Three oversized, heavily blurreddiv circles are wrapped in a container that is scaled to inset-[−50%] (150% of the viewport in each direction) so the blurred edges never produce a visible hard boundary. The wrapper animates continuously with the custom animate-fog-drift keyframe class.
- Blob 1 (
60vw,blur-[120px],mix-blend-screen) — the dominant purple haze that warms the background. - Blob 2 (
50vw,blur-[100px],mix-blend-multiply) — a dark blob that selectively deepens shadows, adding depth contrast to the bright purple. - Blob 3 (
40vw,blur-[100px],mix-blend-screen) — a softer secondary accent that shifts subtly against Blob 1 asanimate-fog-driftruns.
animate-fog-drift keyframes (defined in the Tailwind config) slowly translate and rotate the entire wrapper, giving the impression that the atmosphere is slowly breathing.
Floating particles
Forty acid-green particles float upward from random positions across the viewport, fading in and drifting out the top of the screen in a continuous loop.Particle configuration
The particle array is generated once withuseMemo so it is never recalculated on re-render:
Framer Motion animation
opacity keyframe array [0, 0.8, 0] creates a natural fade-in/fade-out arc over the full duration. ease: 'linear' keeps vertical movement at a constant rate so the particles feel like floating embers rather than spring-driven objects.
Each particle is styled as a tiny rounded circle with an acid-green glow:
Performance considerations
BackgroundEffects is designed to run continuously without impacting page interactivity:
pointer-events: none— the entire component is removed from the hit-testing tree; clicks pass straight through to page content.z-index: 0— sits below all page content (z-10and above) and the navigation sidebar (z-50).useMemo— the particle configuration array is computed once on mount. Random values are not regenerated on every render.mix-blend-screen/mix-blend-multiply— GPU-composited blend modes avoid expensive JavaScript repaints for the fog layer.- Framer Motion animation loop — particle animations are handled by Framer Motion’s internal RAF loop and run on the compositor thread where possible, keeping the main thread free.
Customizing particle count
Change the number40 in Array.from({ length: 40 }) to any value:
Each particle is an independent Framer Motion
motion.div with its own animation subscription. Significantly increasing the count (e.g. beyond 80–100) may introduce frame-rate pressure on lower-powered devices. Test on target hardware before shipping a higher value.