Clone Project

Command Menu (⌘ + K)

Created by
Will Gibson
Similar Projects
Oops! Something went wrong while submitting the form.

0 Comments

Be the first to leave a comment.
Loading
User is typing...
No Name
Set
4 years ago
Moderator
This is the actual comment. It's can be long or short. And must contain only text information.
(Edited)
No Name
Set
2 years ago
Moderator
This is the actual comment. It's can be long or short. And must contain only text information.
(Edited)
Load More
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Load More
Description:  
Description from Webflow:  
A keyboard-activated (⌘ + K) menu with arrow navigation. Had a ton of fun building this project and after some great feedback, wanted to put it out for the community. Most of the functionality comes from the page code in the <head> tag, here's a quick breakdown of the four sections, courtesy of ChatGPT: 1) Initialization: Waits for the HTML and CSS to load before identifying 'modal' and 'closeButton' elements through IDs. 2) Keyboard Toggle: Listens for 'Command/Control + K' key press, toggling the 'modal' element's visibility between 'display: none' and 'display: flex'. 3) Close Button: Assigns functionality to a 'closeButton' element, working seamlessly with the keyboard toggle. 4) Arrow Key Navigation: Disables default arrow key behavior and focuses navigation on modal links, customizing the focused state for accessibility. Exclude links by assigning them the 'ignoreLink' ID. Apply the 'modal' ID to the content container and 'closeButton' ID to the close element. Enjoy, Will
Tags from Webflow: 
modal,  javascript,  menu,  popup,  keyboard,  customcode,  code,  command,  navigation,  nav,  navbar
.