visionOS Tab Bar Split Separate button below

Is it possible to add an ornament below a tab bar like this? Or does the whole side bar have to be an ornament to build this?

There is no tab bar API to create such accessories, so you would indeed need to use the ornament API.

It's possible to recreate the whole tab bar and add the extra button, but it would require a lot of work to make it match exactly the system one. Another option is to try to manually position the ornament below the tab bar by using a custom alignment guide so that it has the right spacing:

.ornament(attachmentAnchor: .scene(.leading), contentAlignment: .trailing) {
    MyButtonOrnament()
        .alignmentGuide(VerticalAlignment.center) { d in d[VerticalAlignment.center] - offsetFromCenter }
        .alignmentGuide(HorizontalAlignment.trailing) { d in d[HorizontalAlignment.trailing] + 24 }
        }

You would need to tweak the offset values to match your needs.

visionOS Tab Bar Split Separate button below
 
 
Q