Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sentryco/blurview
BlurView for iOS and macOS
https://github.com/sentryco/blurview
Last synced: 27 days ago
JSON representation
BlurView for iOS and macOS
- Host: GitHub
- URL: https://github.com/sentryco/blurview
- Owner: sentryco
- License: mit
- Created: 2024-10-03T22:08:18.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-20T11:59:15.000Z (2 months ago)
- Last Synced: 2024-12-20T12:38:13.061Z (2 months ago)
- Language: Swift
- Size: 35.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/sentryco/BlurView/actions/workflows/Tests.yml)
[](https://codebeat.co/projects/github-com-sentryco-blurview-main)
[](LICENSE)
[](#)
[](https://swift.org/package-manager/)
[](https://swift.org/blog/swift-5-9-released/)# BlurView
> BlurView for iOS and macOS
## Project Description
BlurView is a versatile library for iOS and macOS that provides an easy way to add a blur effect to your applications. Whether you're looking to improve UI aesthetics or add some visual flair, BlurView is designed to be simple to integrate and use.## Features
- Easy integration with iOS and macOS projects.
- Customizable blur intensity and style.
- Lightweight with minimal performance impact.## Example:
- Adding an `.overlay()` can tint the translucent effect for both iOS and macOS. See View+Blur for example
- There is a macOS example in `DebugHeaderView.swift`
- There is a iOS example in `EffectView.swift`**MacOS:**
```swift
Rectangle()
.foregroundColor(Color.clear.opacity(0))
.frame(width: .infinity, height: 80, alignment: .top)
.visualEffect(material: .headerView, blendingMode: .withinWindow, emphasized: false)
```**iOS:**
```swift
Rectangle()
.foregroundColor(.clear)
.frame(width: .infinity, height: height)
.blurBG(Color.black.opacity(0.12))
```## Installation
```Swift
.package(url: "https://github.com/sentry.co/BlurView", branch: "main")
```## Todo:
- A current limitation is that macOS cant match background color with translucent tint color. Unlike iOS where this library has support for that. But I think we solved that in legacy, So look for that solution and recreate here. If there is no solution. Stick with OS provided background colors, which match the translucent. Or add an underlay that does not cover the overlay area.