How to Add the Konami Code in Webflow
Learn how to add the legendary Konami code to your Webflow site to trigger a secret easter egg.
In this tutorial, Sandro, co-founder of Gemeos Webflow agency, shows you how to add the legendary Konami Code to your Webflow site to trigger a secret easter egg.
Example
Understanding the Konami Code
The Konami Code (↑↑↓↓←→←→BA) is a cheat code invented by Kazuhisa Hashimoto in 1986 for the game Gradius on NES. It became a gaming cultural reference and is used by many sites as a subtle easter egg. On Webflow, developers especially love it.
1. Add the script in Footer code
The script is self-contained, so you don't need any Webflow element. It creates the toast and animations on its own.
2. Combine it with canvas-confetti
To add confetti when the code is activated, load canvas-confetti in the head and the script will trigger it automatically:
3. Customize the easter egg
Replace the content of the triggerEasterEgg() function with any action you want: redirect to a secret page, switch the theme, display a GIF, activate a special mode...
Conclusion
The Konami Code is the web's most iconic easter egg. Type ↑↑↓↓←→←→BA to test it on this page. Use cases:
- Developer portfolios and creative agencies
- Gaming or pop culture sites
- Tech hiring pages
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
.avif)














