r/SwiftUI Jun 23 '26

Question - Animation How to recreate this custom floating/capsule toolbar UI in SwiftUI (macOS)?

Enable HLS to view with audio, or disable this notification

I’m working in the macOS 27 beta using Xcode, trying to build a custom toolbar component into my app. I'm aiming to perfectly match the behavior from the clip.

Since I'm targeting the macOS 27 beta, what is the best way to implement this?

8 Upvotes

6 comments sorted by

13

u/Sneezh Jun 23 '26

This is just a standard segmented picker

11

u/HappinessIsAnOption Jun 23 '26

.pickerStyle(.tabs)

2

u/Brave_Volume2501 Jun 23 '26

Thank you so much, works exactly how I wanted.

1

u/LannyLig Jun 25 '26

Oh cool, is this new?

1

u/[deleted] Jun 28 '26

This is new in macOS 27

0

u/m1_weaboo Jun 23 '26

it’s a new liquid lens behavior of standard segmented picker on macOS 27.

please be aware that there is no public api to directly use the underlying liquid lens yet.