Swiftpack.co - Package - lucasbrown/swiftui-visual-effects

SwiftUI Visual Effects

System materials in SwiftUI

View modifiers that wrap UIVisualEffectView and all of its associated objects, with environment integration for storing effect styles. Vibrancy effects will always use the current blur effect style for proper vibrancy-effect layering.

Adding and Styling a Blur Effect

  // Add a blur effect.
  // Style the blur effect.

Adding and Styling a Vibrancy Effect

  // Add a vibrancy effect.
  // Style the vibrancy effect.

Adding and Styling Blur and Vibrancy Effects

ZStack {
    // Add a blur effect.

    // Add a vibrancy effect.
// Set the style for blur effects within this view.
// Set the style for vibrancy effects within this view.

Adding Blur and Vibrancy Effects Directly to a View

Adding both a blur and vibrancy effect directly to a view only displays the blur effect.

If you’d like to blur the view’s background content, while adding vibrancy to the view’s foreground content, use the .background() modifier, and pass BlurEffect() as its argument. Although BlurEffect may not be very Apple-like, it’s better than the .blurEffect() modifier implementation below.


// as opposed to:



Stars: 76


Used By

Total: 0


SwiftUI Visual Effects 1.0.3 - 2020-06-30 22:17:28

  • Licensed the project.
  • Added support for state changes.
  • Moved the following structures to a Wrappers folder in Sources/SwiftUIVisualEffects:
    • _BlurVisualEffectViewRepresentable
    • _VibrancyVisualEffectViewRepresentable
  • Moved BlurEffect to a new file, BlurEffect.swift, in Sources/SwiftUIVisualEffects.

SwiftUI Visual Effects 1.0.2 - 2020-06-26 00:53:07

  • Added images to README.md.
  • Made minor fixes to the documentation.
  • Removed the now-unnecessary demonstration.

SwiftUI Visual Effects 1.0.1 - 2020-06-25 17:17:47

Added minor tweaks to the demonstration.

SwiftUI Visual Effects 1.0 - 2020-06-24 22:27:58

The initial release.