visionOS: How to implement vibrancy text style using SwiftUI?

Hi,

I'm trying to apply the Vibrancy text style to SwiftUI Text. However, I didn't find proper API to do this.

As the session video wwdc2023-10076 said, vibrancy brightens foreground content that displays on top of a material and works by pulling light and color forward from what's behind it.

However, when I set .secondary foreground style to a Text, it's just some graycolor with a constant alpha value. It there any other API to achieve the vibrancy style?

Thanks!

  • Have you by any chance found a solution?

Add a Comment