All open-source packages
UISwift

LiquidGlassKit

Liquid Glass surfaces and controls for SwiftUI: native glass on OS 26, a Material fallback down to iOS 17.

17StarsLatest Release: v2.1.0Updated: October 15, 2026
Platforms:iOS 17macOS 14tvOS 17watchOS 10visionOS 1

License: MIT

A SwiftUI package for apps that want Liquid Glass but still support systems without it. On iOS, macOS, tvOS and watchOS 26 it draws with SwiftUI's native glassEffect; on earlier versions and on visionOS it draws a Material blur with a tint, an edge highlight and a shadow. Every component is built on one modifier, glassSurface, so the theme, the rendering path and Reduce Transparency are handled in one place. No third-party dependencies.

Features

  • One modifier, two paths: glassSurface picks native glass or the Material fallback at run time, and glassRenderingMode(.fallback) forces one look everywhere
  • Ready-made controls: buttons, a switch style, a slider, cards, text fields, a search bar, a floating tab bar with an action button and badges, a navigation bar and a bottom sheet
  • Gradient-tinted glass and animated shimmer, pulse and breathe highlights on both rendering paths
  • GlassTheme for a whole view hierarchy, 14 presets in GlassPreset, and GlassCodeExporter to turn a tuned theme back into Swift
  • Accessibility: the fallback draws an opaque background with Reduce Transparency and a stronger edge with Increase Contrast, no highlights with Reduce Motion, SwiftUI's own VoiceOver behavior for the switch and slider
  • No name clashes with SwiftUI's glassEffect, GlassEffectContainer or GlassButtonStyle, so both modules can be imported in one file
  • Swift Testing suites with offscreen pixel checks, run in CI on macOS, an iOS 26 simulator and an iOS 18.6 simulator

Quickstart

swift
1import LiquidGlassKit
2import SwiftUI
3 
4struct ContentView: View {
5 var body: some View {
6 ZStack {
7 LinearGradient(colors: [.indigo, .pink], startPoint: .top, endPoint: .bottom)
8 .ignoresSafeArea()
9 VStack(spacing: 16) {
10 GlassCard {
11 Label("Hello, glass", systemImage: "sparkles")
12 }
13 GlassButton("Tap me", systemImage: "hand.tap") {}
14 }
15 }
16 }
17}

Installation

Swift Package Manager (Xcode)

text
1https://github.com/muhittincamdali/LiquidGlassKit.git

Swift Package Manager (Package.swift)

swift
1dependencies: [
2 .package(url: "https://github.com/muhittincamdali/LiquidGlassKit.git", from: "2.1.0")
3],
4targets: [
5 .target(name: "YourApp", dependencies: [
6 .product(name: "LiquidGlassKit", package: "LiquidGlassKit")
7 ])
8]

Screenshots

Component gallery of the demo app in light mode
Component gallery of the demo app in dark mode
The same components on the native glass path and on the Material fallback, light mode
The same components on the native glass path and on the Material fallback, dark mode
Floating glass bottom sheet, light mode
Floating glass tab bars with an action button and badges, dark mode
Playground screen that tunes a preset with sliders and shows the exported Swift code

Timeline

  1. Repository opened; the v1.0.0 tag points at the first commit, which does not build

  2. Simplification: most of the source was removed and replaced by placeholders; the tests did not compile and CI hid it with continue-on-error

  3. Rebuilt for Swift 6 as 2.0.0 (PR #5): glassSurface with a native and a Material path, Swift Testing, DocC and a demo app

  4. 2.1.0 (PR #7): controls, effects, presets and a code exporter rewritten from LiquidGlass-Playground and GlassmorphismUI, which were archived

Links

Merged Repositories

Related Article

Read the article