Selection dropdown

I’d like to create a simple dropdown like when you click on “Learn >” right at the top of this page or the “watching” below this post depending on where you are
It should just be a simple list with clickable items that opens when you click an arrow at the side of a button and floats on top of the other elements and closes again when you click outside or on one of the elements

edit: pick_list is quite close to what I want
an important details is that I want to be able to click on the button next to the small arrow/triangle without opening the list