Skip to content

ahmetbostanciklioglu/LiquidGlassEffectsSwiftUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

💧 Liquid Glass Effects — SwiftUI

A hands-on demo of Apple's iOS 26 Liquid Glass APIs in SwiftUI

Platform Swift SwiftUI Xcode Stars Last Commit

📖 Overview

Liquid Glass Effects is a compact SwiftUI sample project that demonstrates the Liquid Glass rendering APIs introduced in iOS 26. It shows how to apply the glass material to a standard button, how to attach a tinted, interactive glass effect to a custom view, and how to layer these controls over a background image. Each piece lives in its own small SwiftUI view so the individual APIs are easy to read and reuse.

✨ Features

  • Glass button style — a Button styled with the built-in .buttonStyle(.glass).
  • Custom Liquid Glass view — a heart symbol with .glassEffect(.regular.tint(...).interactive(), in: .circle), showing how to tint and make a glass shape interactive.
  • Background layering — a rounded, clipped background image (BackgroundImage) composed behind the glass controls in a ZStack.
  • Modular viewsLiquidGlassButton, CustomLiquidGlassView, and BackgroundImage are separated into small, reusable helper views.
  • Dark-mode previews — SwiftUI previews configured with .preferredColorScheme(.dark) to showcase the effect.

📸 Preview

Liquid Glass Effects screenshot Liquid Glass Effects screenshot Liquid Glass Effects screenshot

🚀 Getting Started

git clone https://github.com/ahmetbostanciklioglu/LiquidGlassEffectsSwiftUI.git
cd LiquidGlassEffectsSwiftUI
open LiquidGlassEffects.xcodeproj

Once the project is open in Xcode, select an iOS 26 simulator (or a device) and press ⌘R to build and run.

📋 Requirements

  • iOS 26.1 or later
  • Xcode 26
  • Swift 5.0

The Liquid Glass APIs (.buttonStyle(.glass) and .glassEffect) require iOS 26, so an iOS 26 SDK and simulator/device are needed to build and preview the effects.

🧑‍💻 Author

Ahmet Bostancıklıoğlu@ahmetbostanciklioglu · ahmetbostancikli@gmail.com

⭐ If this helped you, consider giving the repo a star!

About

SwiftUI demo of Apple's iOS 26 Liquid Glass APIs: glass button style, tinted interactive glass effects

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages