'How to display dropdown menu in macOS swiftUI

i have a button if pressed, will show items in a dropdown menu. But i'm not sure how to display a menu showing the itmes after pressing the button. This is for a macOS app.

struct ContentView: View {
    var body: some View {
        Text("Hello, world!")
            .padding()

        Button {
         
        }

        label: {
            Image(systemName: "bookmark.circle")
                .resizable()
                .frame(width:24.0, height: 24.0)
         }
        .buttonStyle(PlainButtonStyle())
        
      
    //List items that i want to display in the dropdown menu
    
    ForEach((1...5), id: \.self) {
            Text("\($0)")
            Divider()
        }         
   }       
}
   


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source