Collapsable/Expandable Menu

Hi everyone, I am trying to make a collapsable/expandable menu. I am new to this and wanted to get some guidance on how I can add this to my app.

Menu to do what?

One that pops up based on a button click? Like this example? How to show a context menu - a free SwiftUI by Example tutorial

More like a table view with cells, but when clicked on a cell it expands and shows sub cells under that specific cell
I hope that made sense


like this one