I liked this article and made a menu class from scratch
https://maeyler.github.io/JS/util/Menu_items.html