Glass effect
@symbiote-native/glass-effect wraps
expo-glass-effect, the Liquid Glass
native views of iOS 26, so every SymbioteNative adapter can reach them, not just React. Off iOS
both components render a plain View.
Installation
Section titled “Installation”npm install @symbiote-native/glass-effectScaffolding or extending a SymbioteNative app? npx @symbiote-native/cli new --glass-effect (or
add --glass-effect in an existing app) installs and wires this for you.
import { GlassContainer, GlassView } from '@symbiote-native/glass-effect/react';
<GlassContainer spacing={8}> <GlassView glassEffectStyle="clear" tintColor="rgba(255, 59, 48, 0.7)" isInteractive> <Text>Glass</Text> </GlassView></GlassContainer>;<script setup lang="ts">import { GlassContainer, GlassView } from '@symbiote-native/glass-effect/vue';</script>
<template> <GlassContainer :spacing="8"> <GlassView glass-effect-style="clear" tint-color="rgba(255, 59, 48, 0.7)" is-interactive> <text>Glass</text> </GlassView> </GlassContainer></template><script lang="ts"> import { GlassContainer, GlassView } from '@symbiote-native/glass-effect/svelte';</script>
<GlassContainer spacing={8}> <GlassView glassEffectStyle="clear" tintColor="rgba(255, 59, 48, 0.7)" isInteractive={true}> <text>Glass</text> </GlassView></GlassContainer>import { GlassContainer, GlassView } from '@symbiote-native/glass-effect/solid';
<GlassContainer spacing={8}> <GlassView glassEffectStyle="clear" tintColor="rgba(255, 59, 48, 0.7)" isInteractive> <text>Glass</text> </GlassView></GlassContainer>;import { GlassContainer, GlassView } from '@symbiote-native/glass-effect/angular';
@Component({ imports: [GlassContainer, GlassView], template: ` <GlassContainer [spacing]="8"> <GlassView glassEffectStyle="clear" tintColor="rgba(255, 59, 48, 0.7)" [isInteractive]="true"> <text>Glass</text> </GlassView> </GlassContainer> `,})export class Card {}| Prop | Description |
|---|---|
glassEffectStyle |
regular (default), clear, none, or { style, animate, animationDuration } |
tintColor |
A color, a PlatformColor or a DynamicColorIOS |
isInteractive |
Default false |
colorScheme |
auto (default), light, dark |
spacing |
GlassContainer only, the distance at which glass views merge |
Plus style, testID, nativeID, onLayout and the accessibility and responder props every View
takes.
- iOS 26 and later only. Older iOS, Android and the fallback render a plain
Viewwithout the glass props, andisLiquidGlassAvailable()reportsfalsethere. isLiquidGlassAvailable()checks the build, not only the phone. It validates the system version, the compiler version the app was built with and theUIDesignRequiresCompatibilitysetting inInfo.plist.isGlassEffectAPIAvailable()checks the API at runtime, because some iOS 26 betas lack it and crash.- Glass does not survive an opacity of 0. Setting
opacityto0on aGlassViewor on any parent stops the glass from rendering at all. Fade it with theanimateandanimationDurationfields ofglassEffectStyleinstead. - Merge glass views with
GlassContainer. Views inside one container blend into each other when they come withinspacingof each other. - The native view is the root and the children sit inside it, so what you put in a
GlassViewis laid out and touched like the content of anyView.
Common questions
Section titled “Common questions”I see a plain view, no glass. Check three things. The device runs iOS 26 or later, the app was
built with the iOS 26 SDK (Xcode 26), and UIDesignRequiresCompatibility is not set to true in
Info.plist. Log isLiquidGlassAvailable() to see which one fails. On Android and older iOS a
plain view is the expected result.
The glass disappears when its parent fades. This is a platform bug that came in with iOS 26.1:
a glass view under an ancestor whose opacity reaches 0 never renders, which also hits Modal fade
animations. Do not animate the opacity of a glass view or its ancestors. Use
glassEffectStyle={{ style: 'regular', animate: true, animationDuration: 0.3 }} and switch between
regular and none. If you must fade a wrapper, toggle the style to none while the wrapper is
nearly invisible and back to regular once it is not. A reported side issue is a zIndex somewhere
up the tree that also makes the glass vanish, so try removing it.
The glass does not follow my light and dark toggle. colorScheme changes were applied one frame
late upstream, so the material kept its old look until a remount or a tab change. It is fixed in
expo-glass-effect 55.0.8 and this package pins a later release, so update the package.
Rounded corners on one side are ignored. Per-corner radii such as borderTopLeftRadius were
dropped in an SDK 55 canary and fixed before release. Update the package if you see it.
How do I make two glass shapes melt together? Put them in one GlassContainer and set
spacing to the distance at which they should merge.
Does it work on Android? There is no Android implementation upstream. Both components render a
plain View, so give it a background yourself if the design needs one.
The glass gets worse after many mounts. Visual degradation after tens of mount and unmount cycles has been reported upstream without a fix. Keep the glass views you create and destroy to a minimum.
Sources:
- Expo docs: GlassEffect
- expo/expo#41024 glass does not work with animated parent opacity
- expo/expo#50097 glass that fades out leaves later views without glass
- expo/expo#43743 colorScheme does not update the glass
- expo/expo#40778 per-corner radius regression
- expo/expo#50466 degradation after repeated mount cycles
- Apple: set the correct alpha value on a visual effect view
How the wrapper works
Section titled “How the wrapper works”expo-glass-effect’s JS is hand-ported into this package’s core/: the prop types, the two
availability checks and the descriptors. On iOS renderGlassView and renderGlassContainer return
the native view as the root with the children inside it, elsewhere a plain View that drops the
glass props. The package declares android.modules: [] because the upstream package has no Android
folder, and it takes expo-glass-effect for its native iOS code only. Each adapter turns the same
descriptor into its own element, so the five cannot drift apart.