Skip to content

Repository files navigation

Theseus

Theseus

iOS 26 Liquid Glass effects – backported to iOS 13+


What is Theseus?

Theseus gives you translucent UI components with blur, refraction, glare, and spring animations – the iOS 26 look, backported to iOS 13+. Same ship, rebuilt plank by plank for older waters.

Why?

Because some of us watched Apple unveil Liquid Glass at WWDC 2025 and quietly wondered if they could drop support for iOS 13. This is for everyone still supporting devices from 2015.

TabBar
TabBar
Slider
Slider
Switch
Switch
Glass View
Glass View

What you get

  • The iOS 26 Liquid Glass look, running on devices from 2019
  • Metal GPU rendering (with a sensible fallback for ancient hardware)
  • Four drop-in components: TabBar, Slider, Switch, GlassView
  • Accessibility support out of the box
  • Automatic device adaptation – it won't melt an iPhone 8
  • Spring-based morphing animations

Table of Contents


Installation

Add to your Package.swift:

dependencies:[.package(url:"https://github.com/valzevul/Theseus.git", from:"1.0.0")]

Or in Xcode: File → Add Package Dependencies... → paste the repository URL.

RequirementVersion
iOS13.0+
Swift5.9+
MetalOptional (fallback available)

Quick Start

import Theseus
letglassView=TheseusView()
glassView.shape.cornerRadius =20
glassView.sourceView = backgroundView
view.addSubview(glassView)
Settings Demo
SwiftUI

Theseus is a UIKit-based library. For SwiftUI, use UIViewRepresentable wrappers with the Coordinator pattern for proper two-way binding.

Complete, working wrappers are provided in:TheseusDemoSwiftUI/TheseusDemoSwiftUI/Helpers/TheseusViewRepresentable.swift

Includes:

  • TheseusViewRepresentable – Core glass lens
  • TheseusTabBarRepresentable – Tab bar with selection binding
  • TheseusSwitchRepresentable – Toggle with @Binding isOn
  • TheseusSliderRepresentable – Slider with @Binding value
RequirementVersion
LibraryiOS 13+
SwiftUI demoiOS 15+

Components

Three controls, powered by TheseusView.

TheseusTabBar

The glass capsule floats over your selected tab.

lettabBar=TheseusTabBar()
tabBar.items =[TheseusTabBarItem(
icon:UIImage(systemName:"house"),
title:"Home"),TheseusTabBarItem(
icon:UIImage(systemName:"magnifyingglass"),
title:"Search"),
// ...
]
tabBar.selectedIndex =0
tabBar.onItemSelected ={ index inprint("Selected tab: \(index)")}
TabBar Demo

TheseusSlider

The knob stretches into a glass capsule while you drag, or snaps to positions if you need a stepper.

letslider=TheseusSlider()
slider.minimumValue =0
slider.maximumValue =100
slider.setValue(50)
// For discrete positions (like a stepper)
slider.positionsCount =5
slider.markPositions =true
Slider Demo

TheseusSwitch

A toggle that morphs as you flick or drag it.

Switch Demo
lettoggle=TheseusSwitch()
toggle.isOn =true
toggle.onTintColor =.systemGreen
toggle.offTintColor =.systemGray4
toggle.onValueChanged ={ isOn inprint("Switch: \(isOn ?"ON":"OFF")")}

TheseusView

The core building block. A fully customisable glass lens – use it to build your own components or as a standalone translucent overlay.

letglassView=TheseusView()
// Shape
glassView.shape.cornerRadius =24
glassView.shape.borderWidth =1.0
// Glass effect
glassView.blur.radius =20
glassView.refraction.intensity =1.2
glassView.refraction.dispersion =3.0
// Appearance
glassView.opacity =0.85
glassView.theme.tintColor =.systemBlue
.withAlphaComponent(0.1)
// Connect to background
glassView.sourceView = backgroundImageView
TheseusView Demo

TheseusView supports:

  • Blur – Gaussian blur with configurable radius
  • Refraction – Edge distortion with chromatic dispersion
  • Edge effects – Fresnel rim glow and specular highlights
  • Morphing – Spring-based shape animations

Configuration

Basic

varconfig=TheseusConfiguration()
config.blur.radius =20
config.shape.cornerRadius =16
config.opacity =0.9
config.theme.tintColor =UIColor.systemBlue.withAlphaComponent(0.1)letglassView=TheseusView(configuration: config)
Advanced Configuration
// Refraction (glass distortion)
config.refraction.edgeWidth =22.0
config.refraction.intensity =1.45
config.refraction.dispersion =4.0
// Edge effects (fresnel / highlights)
config.edgeEffects.rimRange =45.0
config.edgeEffects.rimGlow =1.0
config.edgeEffects.rimHardness =12.0
// Glare (light reflection)
config.edgeEffects.glareRange =450.0
config.edgeEffects.glareIntensity =1.0
config.edgeEffects.lightAngle =.pi *0.3
config.edgeEffects.glareFocus =0.75
// Morphing animation
config.morph.tension =0.18
config.morph.friction =0.88
config.morph.smoothing =0.45

See TheseusConfiguration.swift for all available options.


Advanced

Device Adaptation

Theseus automatically detects device capabilities and adjusts rendering:

TierRAM / CoresExample DevicesRendering
Tier 3≥6GB, ≥6 coresiPhone 12+Full Metal + true refraction
Tier 2≥4GB, ≥6 coresiPhone 8–11Metal, selective refraction
Tier 1≥3GBOlder iPhonesMetal, cheap approximation
Tier 0<3GBVery old devicesUIVisualEffectView fallback
Fallback Demo
Override for Testing
letsettings=TheseusSettings.shared
settings.tierOverride =.tier0
settings.refractionPolicyOverride =.cheapApprox
settings.resetToDefaults()

Accessibility

Theseus respects system settings automatically.

SettingBehaviour
Reduce TransparencySolid backgrounds instead of blur
Reduce MotionDisables spring morphing animations
Low Power ModeDowngrades effects, reduces frame rate

Performance

Pause rendering when views are hidden to save GPU cycles:

glassView.pauseRendering()
glassView.resumeRendering()

Demo Apps

DemoPathDescription
UIKitTheseusDemo/All components with settings panel
SwiftUITheseusDemoSwiftUI/Complete wrappers (iOS 15+)

License

Apache License 2.0

If you ship Theseus, I'd love a mention in About → Credits.

About

Theseus is a lightweight Swift Package that brings iOS 26 Liquid Glass look and feel all the way back to iOS 13+.

Topics

Resources

Stars

19 stars

Watchers

0 watching

Forks

Contributors

Languages