Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🫧 Glass Effect Container — SwiftUI

A hands-on demo of iOS 26's Liquid Glass APIs — morphing, unioning, and animating glass effects in SwiftUI.

Platform Swift SwiftUI Xcode Stars Last Commit

📖 Overview

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.

✨ Features

  • GlassEffectContainer groups 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 .glass styled button and a withAnimation(.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.

📸 Preview

Glass effect container demo Expanded glass buttons Glass effect union Liquid Glass button

🚀 Getting Started

git clone https://github.com/ahmetbostanciklioglu/Glass_Effect_SwiftUI.git
cd Glass_Effect_SwiftUI
open GlassEffectContainer.xcodeproj

Then select an iOS 26 simulator (or a device running iOS 26) and press ⌘R to build and run.

📋 Requirements

  • iOS 26.1 or later
  • Xcode 26 or later
  • Swift 5.0

🧑‍💻 Author

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


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

About

SwiftUI demo of iOS 26 Liquid Glass: GlassEffectContainer, glassEffectUnion, and morphing glass buttons.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages