Four families of solutions
Before choosing a style, choose the opening mechanism.
The ten snippets fall into four families: pure CSS, native HTML behaviors, minimal JavaScript for state and richer JavaScript for animation.
Pure CSS is attractive for simple menus and quick demos, but it can become rigid when you need outside-click closing, dynamic height coordination or multiple synchronized states.
Native APIs such as `details`, `dialog` and `popover` reduce code and solve part of the accessibility model for you. They are especially compelling when your browser support target makes them viable.