Demo environments
Simulate incidents, errors, or “hack” moments for sales and training without touching real data.
A small JavaScript library for timed visual effects, pranks, and themed chaos on any page.
Drop in one script tag. Call start() or init(). Effects clean up automatically.
Built so you can ship surprises without shipping regret.
#site-main (as on this page) or any container you choose.Concrete ways teams use ChaosToggle.
Simulate incidents, errors, or “hack” moments for sales and training without touching real data.
Hide a konami-style payoff on your marketing site or internal wiki.
Celebrate releases with confetti and themed particles—then reset in one call.
Low-risk fun on staging dashboards and team apps.
Make a slide or prototype memorable with a timed effect sequence.
See how your UI behaves under motion, overlays, and input quirks.
Copy, paste, run.
<script src="https://cdn.jsdelivr.net/npm/chaos-toggle@latest/dist/chaos-toggle.min.js"></script>
<script>
ChaosToggle.start();
</script>
npm install chaos-toggle
import ChaosToggle from 'chaos-toggle';
ChaosToggle.start();
ChaosToggle.start({ duration: 3000 });
document.addEventListener('keydown', (e) => {
if (e.key === 'c') ChaosToggle.trigger();
});
ChaosToggle.start();
document.querySelector('#go').addEventListener('click', () => {
ChaosToggle.runEffect('confetti');
});
Four APIs you will use most often.
ChaosToggle.runEffect('bsod');
ChaosToggle.runEffect('gravity');
ChaosToggle.runMode('nuclear');
ChaosToggle.runMode('demo');
ChaosToggle.openPanel();
ChaosToggle.compose('intro', [
{ effect: 'screenCrack', delay: 0 },
{ effect: 'bsod', delay: 800 },
]);
ChaosToggle.runComposition('intro');
Six effects teams reach for first. Explore the full catalog when you need more.
realityTearViewport split with a glowing rift corebsodFull-screen blue screen prankgravityLet page elements fallconfettiParticle celebrationglitchOverlayScanline glitch layerfakeUpdateFake OS update screen| Effect | Category | What it does |
|---|---|---|
shake | Visual | Shakes the page (4 animation styles) |
glitchOverlay | Full-screen scanline glitch layer | |
noise | Film-grain noise overlay | |
flashOverlay | Pulsing bright flash across viewport | |
confetti | Visual | Falling particles (emoji or colored pieces) |
zoomFlicker | Visual | Subtle scale pulse on root |
fakeErrorState | Visual | Dramatic hue-shift like a broken display |
matrixRain | Full-viewport katakana digital rain | |
rgbSplit | Visual | Chromatic aberration across root |
vhsDistortion | Scanlines, tracking errors, analog skew | |
screenCrack | Shattered-glass fracture lines | |
pixelDissolve | View explodes into colored pixel storm | |
realityTear | Page splits into drifting slabs around a glowing dimensional rift | |
screenMelt | Visual | Viewport drips away with molten edge |
crtShutdown | Visual | Vintage CRT display collapse with phosphor flash |
bsod | Prank | Full-screen Windows Blue Screen of Death |
fakeUpdate | Prank | Convincing Windows Update progress screen |
fakeTerminal | Prank | Hollywood-style typing terminal overlay |
clippy | Prank | Paperclip assistant with unhelpful suggestions |
fakeVirusScan | Prank | Dramatic full-screen antivirus scan UI |
fakeCrash | Prank | Chrome-style "Aw, Snap!" crash page |
gravity | DOM | Visible blocks fall with goofy physics |
elementShuffle | DOM | Swaps on-screen positions of elements |
elementScatter | DOM | Flings elements off-screen with spin |
textScramble | DOM | Replaces text with random characters, then restores |
tinyGiantMode | DOM | Random elements balloon or shrink |
magneticCursor | Interaction | Nearby elements creep toward the pointer |
cursorChaos | Interaction | Rainbow crumbs and restless pointer styles |
cursorDrift | Interaction | Fake pointer slowly wanders from real one |
autoTypo | Interaction | Sneaks extra neighbor keys into text fields |
delayedClicks | Interaction | Clicks pause on loading cursor before firing |
invertedScroll | Interaction | Wheel direction goes backwards |
screenFlip | Interaction | Rotates the whole page upside down |
drunkMode | Interaction | Blurry vision and tipsy wobble |
popups | Corner toast with title and dismiss | |
springParade | Hopping chicks and eggs parade across the page | |
starSpangledBanner | Patriotic flags and stars drape across the top edge | |
hackerHud | Floating status panes and reticle for cyber themes | |
holidayLights | Festive lights and ornaments hang across the top edge | |
hauntedEyes | Glowing eyes peer in from the dark edges of the viewport | |
retroBroadcast | REC badges, channel bugs, and analog broadcast overlays | |
partyBalloons | Birthday banner and balloon bouquet frame the viewport | |
officeStickyNotes | Sticky notes and coffee clutter the page like office desk chaos | |
evacuationTape | Hazard tape and warnings turn the screen into a disaster zone | |
midnightBurst | Countdown medallion and fireworks markers celebrate the New Year rollover | |
harvestTable | A harvest spread of pie, leaves, and candlelight settles along the bottom edge | |
doorbusterMarquee | Flash sale ribbons and discount badges turn the screen into a Black Friday rush | |
protocolGrid | Neon rails and checkout telemetry turn the page into a cyber storefront | |
loveLetters | Pinned notes and heart seals wrap the page in Valentine energy | |
lastCall | Neon bar sign, drinks, and bubbles sway across the viewport | |
panicAlarm | Alarm braces and warning markers slam into the viewport |
Start with a theme that reads instantly, then decide how aggressive runtime behavior is allowed to be. Everything below is live on this page.
Pastel bounce, chicks, eggs, and a spring parade. It reads playful immediately and stays safe for public-facing pages.
springParadeFlags, stars, fireworks, and recoil energy. Good when the page should feel like an event, not just a palette swap.
starSpangledBannerBinary fallout plus a real HUD layer. This is the right default when you want a “breach” moment that reads instantly.
hackerHudBalloons, party copy, and upbeat motion. Useful when you want obvious celebration with almost no risk to the page.
partyBalloonsDoorbuster ribbons and a price-drop center badge make the page feel like a timed sale, not generic glitch.
doorbusterMarqueeHard-stop warning treatment for scripted moments. Great for staging and incident theater, wrong for shared production screens.
panicAlarmSet the policy first, then run the theme or mode. The library respects that boundary for theme, mode, and direct effect execution.
Opinionated configs you can drop in and tweak.
IT department vibes, then panic mode.
ChaosToggle.start({ duration: 4000, theme: 'office' });
ChaosToggle.runTheme('office');
ChaosToggle.runMode('panic');
Glitch stack on a dark theme.
ChaosToggle.start({ duration: 3500, theme: 'halloween' });
ChaosToggle.runTheme('halloween');
ChaosToggle.runEffect('vhsDistortion');
ChaosToggle.runEffect('noise');
Ship-it energy, minimal risk.
ChaosToggle.start({ duration: 5000, theme: 'birthday' });
ChaosToggle.runMode('celebration');
ChaosToggle.runEffect('confetti');
Browse every effect, theme, and mode with buttons and a live sample area.
Open playgroundDeeper than a single script tag—plugins, panel, and types.
Overlays, pranks, DOM, cursor, and interaction effects—composable and timed.
Palettes, particles, overlays, and behaviors bundled per theme.
Holiday, retail, and vibe packs. Override pieces with themeOverrides when you need a custom mix.
Floating UI for intensity, duration, effects, and export/import.
ChaosToggle.openPanel()registerShortcut)Package effects, themes, and install hooks.
ChaosToggle.registerEffect, registerTheme, compose, onChaosToggle.use(plugin) to installExported types for settings, effects, plugins, and the fluent theme builder.
Use ChaosToggleAPI, ChaosEffect, ChaosPlugin, ThemeProfile, and more from the package.
Single bundle with inlined styles. CDN, ESM, or CJS.
No framework required. Drop in and opt in to chaos when you call the API.
ChaosToggle.buildTheme('office-prank')
.palette('#0078d7', '#ffb900', '#f0f0f0', '#333')
.effects('bsod', 'fakeUpdate', 'clippy')
.particles('confetti', { density: 0.3 })
.popup({
title: 'IT Department',
message: 'Your PC has been compromised.'
})
.timing({ durationMultiplier: 2 })
.register();
ChaosToggle.runTheme('office-prank');
const myPlugin = {
id: 'chaos-plugin-office',
name: 'Office Pranks Pack',
version: '1.0.0',
effects: [myCustomEffect],
themes: [{ id: 'corporate', config: {...} }],
install(engine) {
engine.registerShortcut('Shift+B', 'runEffect:bsod');
},
};
ChaosToggle.use(myPlugin);
ChaosToggle.on('beforeTrigger', () =>
console.log('Chaos incoming...')
);
ChaosToggle.on('effectStart', (id) =>
console.log(`Effect: ${id}`)
);
import type {
ChaosEffect,
ChaosPlugin,
ChaosToggleAPI,
ThemeProfile,
ChaosSettings,
} from 'chaos-toggle';
Common methods below. See the repository README for the full surface area.
| Method | Description |
|---|---|
start(config?) / init(config?) | Initialize (aliases; first call wins) |
trigger() | Fire enabled effects for current theme |
reset() | Clear active effects and classes |
runEffect(id) | Run a single effect |
runMode(name) | Run a preset mode |
runTheme(name) | Apply and trigger a theme |
compose / runComposition | Define and run timed sequences |
openPanel() / togglePanel() | Built-in Shadow DOM control panel |
registerShortcut | Keyboard bindings |
use(plugin) | Install a plugin package |
updateSettings | Merge settings at runtime |
| Shortcut | Action |
|---|---|
| Shift+H | Trigger chaos |
| Shift+P | Panic mode |
| Shift+R | Reset |
| Shift+C | Celebration mode |
New effects, themes, fixes, and docs are welcome.