A customizable macOS material blur view that goes beyond NSVisualEffectView.
For a deep dive into the internals, see Reverse Engineering NSVisualEffectView.

The repository includes a demo app for experimenting with effect configurations in real time. Open Demo/MaterialDemo.xcodeproj to try it out.

Add MaterialView to your project using Swift Package Manager:
dependencies: [
.package(url: "https://github.com/OskarGroth/MaterialView.git", from: "1.0.0")
]
import MaterialView
MaterialView(effect: .panelDark, cornerRadius: 12)
.frame(width: 300, height: 200)
import MaterialView
let materialView = NSMaterialView()
materialView.effect = .panelDark
materialView.cornerRadius = 12
Create your own materials with full control over the appearance:
let customEffect = NSMaterialView.Effect(
active: .MaterialStyle(
backgroundColor: NSColor(white: 0.15, alpha: 0.5),
tintColor: NSColor(white: 0.1, alpha: 0.3),
tintFilter: kCAFilterLightenBlendMode,
saturationFactor: 1.8,
brightnessFactor: 0.02,
blurRadius: 30
),
rimColor: (inner: .white.withAlphaComponent(0.15), outer: .clear),
rimWidth: (inner: 1, outer: 0)
)
MaterialView relies on undocumented CoreAnimation classes (CABackdropLayer, CAFilter) and private window properties. While these APIs have been stable for years and are used extensively by Apple's own frameworks, they could change in future macOS releases.
MIT License. See LICENSE for details.
3,502 followers · starred Dec 2025
6,238 followers · starred Dec 2025
892 followers · starred Dec 2025
4,385 followers · starred Dec 2025
A customizable macOS material blur view that goes beyond NSVisualEffectView.
For a deep dive into the internals, see Reverse Engineering NSVisualEffectView.

The repository includes a demo app for experimenting with effect configurations in real time. Open Demo/MaterialDemo.xcodeproj to try it out.

Add MaterialView to your project using Swift Package Manager:
dependencies: [
.package(url: "https://github.com/OskarGroth/MaterialView.git", from: "1.0.0")
]
import MaterialView
MaterialView(effect: .panelDark, cornerRadius: 12)
.frame(width: 300, height: 200)
import MaterialView
let materialView = NSMaterialView()
materialView.effect = .panelDark
materialView.cornerRadius = 12
Create your own materials with full control over the appearance:
let customEffect = NSMaterialView.Effect(
active: .MaterialStyle(
backgroundColor: NSColor(white: 0.15, alpha: 0.5),
tintColor: NSColor(white: 0.1, alpha: 0.3),
tintFilter: kCAFilterLightenBlendMode,
saturationFactor: 1.8,
brightnessFactor: 0.02,
blurRadius: 30
),
rimColor: (inner: .white.withAlphaComponent(0.15), outer: .clear),
rimWidth: (inner: 1, outer: 0)
)
MaterialView relies on undocumented CoreAnimation classes (CABackdropLayer, CAFilter) and private window properties. While these APIs have been stable for years and are used extensively by Apple's own frameworks, they could change in future macOS releases.
MIT License. See LICENSE for details.
3,502 followers · starred Dec 2025
6,238 followers · starred Dec 2025
892 followers · starred Dec 2025
4,385 followers · starred Dec 2025