Swiftpack.co - Package - danielsaidi/SwiftUIBlurView

Version Swift UI Swift 5.1 License Twitter: @danielsaidi

About SwiftUIBlurView

SwiftUIBlurView lets you use UIBlurEffect in SwiftUI. This gives you access to all system blur effects, like .regular, .prominent, .systemMaterial and many more.

To blur any SwiftUI view, just place a BlurView above it:

ZStack {
    Image("photo").frame(width: 200, height: 200)   // This is blurred
    BlurView(.prominent)
    Image("photo").frame(width: 100, height: 100)   // This is not blurred
}

The result looks like this:

The demo application embedded in this project lets you see all system blur effects in action in light and dark mode.

Installation

Swift Package Manager

The easiest way to add SwiftUIBlurView to your project is to use Swift Package Manager:

https://github.com/danielsaidi/SwiftUIBlurView.git

CocoaPods

pod "SwiftUIBlurView"

Carthage

github "danielsaidi/SwiftUIBlurView"

Demo App

This project contains a demo app that shows all available blur styles in dark and light mode. To run the demo app, open and run the SwiftUIBlurView.xcodeproj project.

Contact me

Feel free to reach out if you have questions or if you want to contribute in any way:

License

SwiftUIBlurView is available under the MIT license. See LICENSE file for more info.

Github

link
Stars: 41
Help us keep the lights on

Dependencies

Used By

Total: 0