Building a sidebar element

Hi,
I am looking looking into redesigning my Mac app and give it a sidebar, something like in the Music app, with options to collapse sections, and give it the right translucency that I see in other apps too. What's the best AppKit element to do this? I'm going to use the NSSplitViewController to manage the split-view, but does the sidebar come from a NSTableView, an NSOutlineView, or an NSCollectionView? It's not completely clear what the best building block is for this. I believe the new NSCollectionView API might be a good fit, but not really sure if that is recommended for the sidebar or not.

Thanks for any feedback.
Your question is a bit too vague.
How do you want to present elements ?

Probably want to present as a collection. Exact ?

So, CollectionView would be the natural choice.
The sidebar is usually a 'list' view of some kind, but with section headers that can sometimes be collapsed. One example is the Music app, in Catalina or Big Sur.
Building a sidebar element
 
 
Q