- 68 JavaScript Menus
- Related Articles
- Author
- Links
- Made with
- About a code
- Progress Nav Concept Using the Intersection Observer API
- Author
- Links
- Made with
- About a code
- Vector/ Project Selection
- Author
- Links
- Made with
- About a code
- Travel Video Landing Page
- Author
- Links
- Made with
- About a code
- Twitter Sidebar
- Author
- Links
- Made with
- About a code
- Slide-out Navigation with GSAP 3
- Author
- Links
- Made with
- About a code
- Button Hover Effect
- Author
- Links
- Made with
- About a code
- Endless Wheel Navigation Built With AlpineJS and TailwindCSS
- Author
- Links
- Made with
- About a code
- Menu to Inner Page Animation with Image Grid Background
- Author
- Links
- Made with
- About a code
- Full Screen Navigation Bar
- Author
- Links
- Made with
- About a code
- Menu Navigation Animation
- Author
- Links
- Made with
- About a code
- Travel/Tracking Website Landing Page
- Author
- Links
- Made with
- About a code
- Context Menu
- Author
- Links
- Made with
- About a code
- Fancy Navigation
- Author
- Links
- Made with
- About a code
- Image Hover Navigation
- Author
- Links
- Made with
- About a code
- The 3D Navigation Animation
- Author
- Links
- Made with
- About a code
- Jumping Gooey Navigation
- Author
- Links
- Made with
- About a code
- Full Screen Overlay Navigation
- Author
- Links
- Made with
- About a code
- Nav Stretch
- Author
- Links
- Made with
- About a code
- Bold Hover Animations with Splitting.js
- Author
- Links
- Made with
- About a code
- Link Hover Interaction
- Author
- Links
- Made with
- About a code
- Menu Hover Interaction
- Author
- Links
- Made with
- About a code
- Menu Image Animation on Hover
- Author
- Links
- Made with
- About a code
- Grid Navigation
- Author
- Links
- Made with
- About a code
- The Context Menu
- Author
- Links
- Made with
- About a code
- An Infinitely Scrollable Vertical Menu
- Author
- Links
- Made with
- About a code
- Responsive Navigation with Animations
- Author
- Links
- Made with
- About a code
- Expandable Menu
- Author
- Links
- Made with
- About a code
- Header Underline
- Author
- Links
- Made with
- About a code
- Staggered Blink Text Menu
- Author
- Links
- Made with
- About a code
- SVG Navigation
- Author
- Links
- Made with
- About a code
- Paper Pieces Navigation Menu
- Author
- Links
- Made with
- About a code
- Full Page Navigation
- Author
- Links
- Made with
- About a code
- Window Shade Navigation
- Author
- Links
- Made with
- About a code
- Full-Page Nav Stacking Animation
- Author
- Links
- Made with
- About a code
- Full-Page Navigation
- Author
- Links
- Made with
- About a code
- Flip Navigation
- Author
- Links
- Made with
- About a code
- Sticky ScrollSpy Navigation
- Author
- Links
- Made with
- About a code
- CSS Nav Animation
- Author
- Links
- Made with
- About a code
- Header Nav Overflow Into Mobile Nav
- Author
- Links
- Made with
- About a code
- Nav Menu with Circular Reveal Animation
- Author
- Links
- Made with
- About a code
- Menu Interaction
- Author
- Links
- Made with
- About a code
- Navigation & Sub-navigation
- Author
- Links
- Made with
- About a code
- Clicky Menus
- Author
- Links
- Made with
- About a code
- Draggable Menu with Image Grid Previews
- Author
- Links
- Made with
- About the code
- Interactive Radial Menu
- Author
- Links
- Made with
- About the code
- Creative Hamburger Menu
- Author
- Links
- Made with
- About the code
- Nice Effect For Navigation
- Author
- Links
- Made with
- About a code
- Navigation with SVG
- Author
- Links
- Made with
- About a code
- Ribbon Menu
- Author
- Links
- Made with
- About the code
- Jelly Menu
- Author
- Links
- Made with
- About the code
- Navigation Buttons
- Author
- Links
- Made with
- About the code
- Code Menu
- Author
- Links
- Made with
- About the code
- CSS Grid Menu Panels
- Author
- Links
- Made with
- About the code
- Dropdown Menu
- Author
- Links
- Made with
- About the code
- Responsive Sidebar/Navbar
- Author
- Links
- Made with
- About the code
- Off-Canvas Navigation w/Page Transitions
- Author
- Links
- Made with
- About the code
- Sidebar Template
- Author
- How TO — Clickable Dropdown
- Dropdown
- Create a Clickable Dropdown
- Example
- Example Explained
- Example
- Example Explained
- Example
68 JavaScript Menus
Collection of free vanilla JavaScript navigation menu code examples: responsive, animated, dropdown, sticky and full page. Update of April 2020 collection. 35 new items.
Related Articles
Author
Links
Made with
About a code
Progress Nav Concept Using the Intersection Observer API
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Vector/ Project Selection
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Travel Video Landing Page
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Twitter Sidebar
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Slide-out Navigation with GSAP 3
Compatible browsers: Chrome, Edge, Opera, Safari
Author
Links
Made with
About a code
Button Hover Effect
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Endless Wheel Navigation Built With AlpineJS and TailwindCSS
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: tailwind.css, alpine.js
Author
Links
Made with
About a code
Menu to Inner Page Animation with Image Grid Background
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Full Screen Navigation Bar
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Menu Navigation Animation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Travel/Tracking Website Landing Page
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Context Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Fancy Navigation
Fancy navigation with hover effects.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Image Hover Navigation
Intro animation duration stagger. Mouse position tracking with CSS variables. Text outline reveal on hover.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
The 3D Navigation Animation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Jumping Gooey Navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Full Screen Overlay Navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Nav Stretch
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Bold Hover Animations with Splitting.js
Added Splitting.js to incorporate other silly animation ideas on hover.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: splitting.css, splitting.js
Author
Links
Made with
About a code
Link Hover Interaction
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Menu Hover Interaction
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: locomotive-scroll.css, imagesloaded.js, locomotive-scroll.js, gsap.js
Author
Links
Made with
About a code
Menu Image Animation on Hover
A hover effect for a menu where images appear with an animation on each item.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Grid Navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
The Context Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
An Infinitely Scrollable Vertical Menu
A quick look at how an infinitely scrollable menu works based on a looping scroll illusion of cloned items.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Responsive Navigation with Animations
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Expandable Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Header Underline
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Staggered Blink Text Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
SVG Navigation
Tinker with SVG syntax, the textPath element and the startOffset attribute to create an intriguing navigation. Animated with anime.js.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Paper Pieces Navigation Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Full Page Navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Window Shade Navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Full-Page Nav Stacking Animation
A nav menu concept in which the three bars fill up the screen. This happens in a way that looks like blocks being stacked. When collapsing the menu, the sequence is reversed.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Full-Page Navigation
Created full-page navigation using anime.js and some SVGs.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Flip Navigation
A bit laggy on initial flip though.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Sticky ScrollSpy Navigation
Smooth scrolling sticky scrollspy navigation.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
CSS Nav Animation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Header Nav Overflow Into Mobile Nav
The idea behind this header nav is to move items that no longer fit into a navigation drawer/mobile nav. The trick behind it is to give the header a set height and allow the header nav items to wrap, but hide the overflow. Then use JavaScript to check for any items that have wrapped and reveal them in the drawer/mobile nav.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Nav Menu with Circular Reveal Animation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Menu Interaction
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Navigation & Sub-navigation
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Clicky Menus
Clicky menus: accessible and progressively enhanced menu with clicky dropdowns.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Draggable Menu with Image Grid Previews
A draggable inline menu with a scattered thumbnail preview of an image grid.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: imagesloaded.js, charming.js, tweenmax.js, draggabilly.js
Author
Links
Made with
About the code
Interactive Radial Menu
Interactive radial menu in HTML, CSS and JS.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Creative Hamburger Menu
Hamburger menu using the new clip-path CSS property.
Compatible browsers: Chrome, Edge (partial), Firefox, Opera, Safari
Author
Links
Made with
About the code
Nice Effect For Navigation
Excellent hover and click effect for navigation bar or other.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Navigation with SVG
SVG used to animate a navigation bar. Effects are triggered on hover and click.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About a code
Ribbon Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Jelly Menu
Jelly menu concept in HTML, CSS and JS.
Compatible browsers: Chrome, Edge (partial), Firefox, Opera, Safari
Author
Links
Made with
About the code
Navigation Buttons
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Code Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
CSS Grid Menu Panels
Animated CSS grid-based menu panels. Click the toggle in the top left corner to see it in action.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Author
Links
Made with
About the code
Dropdown Menu
Author
Links
Made with
About the code
Responsive Sidebar/Navbar
Vertical/Horizontal responsive sidebar/navbar.
Author
Links
Made with
About the code
Off-Canvas Navigation w/Page Transitions
More experimentation with transitions and navigation. Decided to add in a little bit for page transitions as well.
Author
Links
Made with
About the code
Sidebar Template
Sidebar template with drop down menu based on Bootstrap.
Author
How TO — Clickable Dropdown
Learn how to create a clickable dropdown menu with CSS and JavaScript.
Dropdown
A dropdown menu is a toggleable menu that allows the user to choose one value from a predefined list:
Create a Clickable Dropdown
Create a dropdown menu that appears when the user clicks on a button.
Step 1) Add HTML:
Example
Example Explained
Use any element to open the dropdown menu, e.g. a , or
element.
Use a container element (like ) to create the dropdown menu and add the dropdown links inside it.
Wrap a element around the button and the to position the dropdown menu correctly with CSS.
Step 2) Add CSS:
Example
/* Dropdown Button */
.dropbtn background-color: #3498DB;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
>
/* The container — needed to position the dropdown content */
.dropdown position: relative;
display: inline-block;
>
/* Dropdown Content (Hidden by Default) */
.dropdown-content display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
>
/* Links inside the dropdown */
.dropdown-content a color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
>
/* Change color of dropdown links on hover */
.dropdown-content a:hover
/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
.show
Example Explained
We have styled the dropdown button with a background-color, padding, hover effect, etc.
The .dropdown class uses position:relative , which is needed when we want the dropdown content to be placed right below the dropdown button (using position:absolute ).
The .dropdown-content class holds the actual dropdown menu. It is hidden by default, and will be displayed on hover (see below). Note the min-width is set to 160px. Feel free to change this. Tip: If you want the width of the dropdown content to be as wide as the dropdown button, set the width to 100% (and overflow:auto to enable scroll on small screens).
Instead of using a border, we have used the box-shadow property to make the dropdown menu look like a «card». We also use z-index to place the dropdown in front of other elements.
Step 3) Add JavaScript:
Example
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() document.getElementById(«myDropdown»).classList.toggle(«show»);
>
// Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) if (!event.target.matches(‘.dropbtn’)) var dropdowns = document.getElementsByClassName(«dropdown-content»);
var i;
for (i = 0; i < dropdowns.length; i++) var openDropdown = dropdowns[i];
if (openDropdown.classList.contains(‘show’)) openDropdown.classList.remove(‘show’);
>
>
>
>