SwipeUI

Glass surface

Shared Liquid Glass material with accessible blur and opaque fallbacks and merging groups.

npx @swipeui/cli add glass-surface
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When to use it

  • Building your own floating controls, toolbars or panels that should use Liquid Glass on iOS 26.
  • Any custom component that needs the same glass, blur and opaque fallbacks as SwipeUI's glass items.
  • Grouping nearby glass shapes so they merge into one when they get close, like iOS buttons in a cluster.
  • Overlays on photos, maps or video where a translucent surface keeps context visible.

When not to use it

  • Ordinary cards and sections on a plain background. Card is lighter and easier to read.
  • Long text or dense forms; glass lowers contrast behind text.
  • Places where a ready-made glass item exists, such as Glass button, Glass toolbar or Glass tab bar.
  • Apps that don't target iOS 26 and don't want blur; a solid surface token is simpler.

Installation

Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.

npx @swipeui/cli add glass-surface
  • Adds components/swipeui/glass/glass-surface.tsx and 2 shared helpers.
  • Installs expo-glass-effect, expo-blur, uniwind, clsx, tailwind-merge. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/(tabs)/_layout.tsx
import { GlassSurface } from '@/components/swipeui/glass/glass-surface';

<GlassSurface className="p-4">
  <Text>Navigation surface</Text>
</GlassSurface>;

API reference

PropTypeDefaultDescription
material?"auto" | GlassMaterial'auto'

Preferred material; unsupported choices fall back.

glassStyle?"clear" | "regular"'regular'

Native glass style.

isInteractive?booleanfalse

Enables native touch feedback.

tinted?booleanfalse

Washes native glass with the glass-tint token. The token is mostly opaque, so a tinted surface reads as a flat panel; leave it off for the clear, refracting Liquid Glass look.

blurTarget?RefObject<ReactNativeElement | null>—

Android requires a BlurTargetView ref for real blur.

blurIntensity?number60

Blur strength.

className?string—

Token classes on the surface.

Composition and behavior

  • material prefers glass, blur or opaque (auto by default); unsupported choices fall back.
  • glassStyle is regular or clear (for bars over photos and video).
  • isInteractive enables native touch feedback on glass.
  • Native glass is untinted, like the system bars, so it refracts what scrolls under it. tinted washes it with the glass-tint token for a flatter, more opaque panel.
  • GlassSurfaceGroup merges neighbouring glass surfaces within spacing.
  • Every SwipeUI glass item is built on this.

Behavior and gestures

  • On its own it's a surface, not a control; it doesn't respond to touch unless you put buttons in it.
  • isInteractive turns on the system's native glass touch shimmer for surfaces that act as buttons.
  • The material picks itself: Liquid Glass on iOS 26+, blur where blur really works, otherwise the opaque elevated surface.
  • Turning on Reduce Transparency switches to the opaque surface live.
  • Inside GlassSurfaceGroup, glass shapes closer than spacing melt together as they move.

Accessibility

  • Reduce Transparency always wins, even over a forced material, so text never sits on see-through glass for people who've asked for solid surfaces.
  • The opaque fallback uses your surface-elevated token, which keeps theme contrast.
  • The surface adds no accessible name; label the controls inside it.
  • Avoid small or thin text on clear glass over busy imagery.

Motion

  • Uses the press motion role, so it follows your app's feel. Pass motion to tune this one instance.
  • The surface itself doesn't animate. Native glass handles its own shimmer and merging.
  • Movement comes from what you put inside, such as Pressable's press scale.

Performance

  • Liquid Glass is drawn by the system. Blur is only used where it really blurs.
  • Android blur needs a BlurTargetView ref; without it the cheaper opaque surface is used.

Notes for AI

  • Leave material on auto and let fallbacks work.
  • Pass blurTarget on Android only when you've wrapped content in a BlurTargetView.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items