Breaking down Amazon’s mega dropdown (2013)
Amazon's massive "Shop by Department" dropdown menu performs hover effects with remarkable speed, leaving users impressed by its instantaneous menu filling. Unlike many dropdown menus that include a delay when activating submenus, Amazon's dropdown avoids this issue, as demonstrated by examples from Khan Academy and Bootstrap. Amazon achieves this snappy feel by detecting the direction of the cursor's path, creating a triangle between the current mouse position and the upper and lower right corners of the dropdown menu.
As long as the cursor stays within this blue triangle, the current submenu remains open, even if the cursor momentarily hovers over another option. If the cursor moves outside the triangle, Amazon instantly switches to the new submenu, providing a responsive user experience. To showcase this technique, a jQuery plugin called jQuery-menu-aim was created, which has been utilized in the new Khan Academy "Learn" menu.
The developer acknowledges the brilliant ideas behind Amazon's dropdown design, expressing gratitude to Sophie Alpert for her assistance in understanding the underlying linear algebra and cross-product concepts. Despite the complexity, the developer opted for a simpler slope-based approach due to a lack of intuitive understanding of linear algebra.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.