Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/spooky/llms.txt
Use this file to discover all available pages before exploring further.
JumpScareSpider is an opt-in interactive Halloween effect — a spider that occasionally drops from the top of the screen into the viewport. The component reads from JumpScareContext to check whether the feature is currently enabled by the user, and only fires when the user has explicitly opted in. It is designed to delight visitors who want the full spooky experience while staying completely inert for those who prefer a calmer environment.
Jump-scare system
The spider effect is built from three cooperating parts:-
JumpScareContext(assets/JumpScareContext.js) — A React Context that holds a booleanscaresEnabledstate and atoggleScaresfunction. The provider also tracks aninteractionCountinteger that increments as the user interacts with the page. The enabled state is persisted tolocalStorageunder the keyspooky-scares-enabled, so the user’s preference is remembered across page loads. -
JumpScareToggle— A button component rendered in the bottom-right corner of every page. Clicking it callstoggleScares()on the context, flippingscaresEnabledbetweentrueandfalse. When scares are on, the button displays the Ghost icon in pumpkin orange; when off, it shows the Eye Off icon in gray. -
JumpScareSpider— The animation component itself. It readsscaresEnabledandinteractionCountfrom context and only triggers oncescaresEnabledistrueandinteractionCounthas reached at least3. Once triggered, the spider drops into view using a Framer Motion spring animation, sways gently, then retracts after 3 seconds. AhasTriggeredguard prevents the spider from dropping more than once per page session.
User control
The jump-scare spider is fully user-controlled. TheJumpScareToggle button is always visible in the UI at the bottom-right of every page, so visitors can disable the effect at any moment. The button’s aria-label updates dynamically — "Disable jump scares" when active and "Enable jump scares" when inactive — so screen reader users can also identify and operate the control.
Because the spider requires interactionCount >= 3 before it fires, it will not trigger immediately on page load, even when scares are enabled. This adds a moment of natural delay rather than surprising visitors the instant they arrive.
Disabling the spider entirely
To remove the spider from the theme completely when rebuilding from source:- Open
components/Layout.jsand remove the<JumpScareSpider />JSX element and its import. - Optionally, remove the
<JumpScareToggle />element and its import fromLayout.jsas well — the toggle has no function without the spider. - Remove
assets/JumpScareContext.jsand its provider wrapper from the app entry point.