A hands-on demo of iOS 26's Liquid Glass APIs — morphing, unioning, and animating glass effects in SwiftUI.
Glass Effect Container is a small SwiftUI sample that explores Apple's new Liquid Glass design system introduced in iOS 26. It renders a photo card with a floating control that expands into a set of glass buttons, showcasing how GlassEffectContainer coordinates and morphs multiple glass elements into a single fluid surface. The project is a focused learning reference for the .glassEffect, .glassEffectUnion, and .buttonStyle(.glass) modifiers.
GlassEffectContainergroups nearby glass views so they blend and morph together with a configurable spacing..glassEffectUnion(id:namespace:)fuses two icons (a heart and a magnifying glass) into one continuous glass capsule.- Expand / collapse animation driven by a
.glassstyled button and awithAnimation(.smooth(...))transition. .buttonStyle(.glass)applies the native Liquid Glass appearance to an interactive control.- Ships with an inline note on
.glassEffectTransition(.identity)for opting out of the morphing effect.
git clone https://github.com/ahmetbostanciklioglu/Glass_Effect_SwiftUI.git
cd Glass_Effect_SwiftUI
open GlassEffectContainer.xcodeprojThen select an iOS 26 simulator (or a device running iOS 26) and press ⌘R to build and run.
- iOS 26.1 or later
- Xcode 26 or later
- Swift 5.0
Ahmet Bostancıklıoğlu — @ahmetbostanciklioglu · ahmetbostancikli@gmail.com
⭐ If this helped you, consider giving the repo a star!



