Skip to content
expo-glass-effect logo

Expo Glass Effect

expo-glass-effect

Guide for using expo-glass-effect to create iOS native liquid glass UI effects. Apply when implementing glass effect UI components, cards, or surfaces on iOS.

SKILL.md

Full skill instructions

Expo Glass Effect

Guide for using expo-glass-effect to create iOS native liquid glass UI effects.

Overview

  • Platform: iOS 26+ only (falls back to regular View on unsupported platforms)
  • Native API: Uses UIVisualEffectView under the hood
  • Package: expo-glass-effect

Installation

npx expo install expo-glass-effect

Core Components

GlassView

Primary component for rendering glass effect surfaces.

import { GlassView } from 'expo-glass-effect';

<GlassView
  style={styles.glass}
  glassEffectStyle="regular"  // 'regular' | 'clear'
  isInteractive={false}       // Enable interactive glass effect
  tintColor="#ffffff"         // Optional tint overlay
/>

Props:

  • glassEffectStyle: 'regular' (default) or 'clear'
  • isInteractive: Boolean for interactive behavior (default: false)
  • tintColor: Optional color string for tinting the glass
  • All standard View props (style, children, etc.)

GlassContainer

Wrapper for combining multiple glass views with merged effects.

import { GlassContainer, GlassView } from 'expo-glass-effect';

<GlassContainer spacing={10} style={styles.container}>
  <GlassView style={styles.glass1} isInteractive />
  <GlassView style={styles.glass2} />
  <GlassView style={styles.glass3} />
</​GlassContainer>

Props:

  • spacing: Distance (number) at which glass elements start merging effects
  • All standard View props

Utility Functions

isLiquidGlassAvailable()

Check if glass components are available (validates system version, compiler version, Info.plist settings).

import { isLiquidGlassAvailable } from 'expo-glass-effect';

if (isLiquidGlassAvailable()) {
  // Render GlassView
} else {
  // Render fallback UI
}

Note: This checks component availability, not user accessibility settings. Use AccessibilityInfo.isReduceTransparencyEnabled() to check if user disabled transparency.

isGlassEffectAPIAvailable()

Runtime check for Glass Effect API availability on device (important for iOS 26 beta compatibility).

import { isGlassEffectAPIAvailable } from 'expo-glass-effect';

if (isGlassEffectAPIAvailable()) {
  // Safe to use GlassView
}

Common Patterns

Basic Glass Card

import { StyleSheet, View, Image, Text } from 'react-native';
import { GlassView } from 'expo-glass-effect';

export default function GlassCard() {
  return (
    <View style={styles.container}>
      <Image
        style={styles.background}
        source={{ uri: 'https://example.com/​image.jpg' }}
      />
      <GlassView style={styles.card}>
        <Text style={styles.text}>Glass Effect Card</​Text>
      </​GlassView>
    </​View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  background: {
    ...StyleSheet.absoluteFill,
  },
  card: {
    position: 'absolute',
    top: 100,
    left: 50,
    width: 200,
    height: 100,
    borderRadius: 12,
    padding: 20,
  },
});

Merged Glass Elements

import { GlassContainer, GlassView } from 'expo-glass-effect';

<GlassContainer spacing={10} style={styles.row}>
  <GlassView style={styles.circle1} isInteractive />
  <GlassView style={styles.circle2} />
  <GlassView style={styles.circle3} />
</​GlassContainer>

Conditional Rendering with Fallback

import { isLiquidGlassAvailable, GlassView } from 'expo-glass-effect';
import { View } from 'react-native';

function Card({ children, style }) {
  const GlassComponent = isLiquidGlassAvailable() ? GlassView : View;

  return (
    <GlassComponent style={[styles.card, style]}>
      {children}
    </​GlassComponent>
  );
}

Known Issues & Limitations

1. isInteractive Cannot Change Dynamically

// ❌ BAD - Won't work after initial render
const [interactive, setInteractive] = useState(false);
<GlassView isInteractive={interactive} />

// ✅ GOOD - Remount with different key
const [interactive, setInteractive] = useState(false);
<GlassView key={interactive ? 'interactive' : 'static'} isInteractive={interactive} />

2. Opacity Issues

Avoid opacity < 1 on GlassView or parent views - causes rendering issues.

// ❌ BAD
<View style={{ opacity: 0.8 }}>
  <GlassView />
</​View>

// ✅ GOOD - Use tintColor instead
<GlassView tintColor="rgba(255, 255, 255, 0.8)" />

3. Platform Support

Always wrap in platform checks or use fallback components for cross-platform apps:

import { Platform } from 'react-native';
import { isLiquidGlassAvailable, GlassView } from 'expo-glass-effect';

const useGlass = Platform.OS === 'ios' && isLiquidGlassAvailable();

Styling Best Practices

  1. Always use position: 'absolute' for layering over background content
  2. Use borderRadius to create rounded glass surfaces
  3. Layer backgrounds using StyleSheet.absoluteFill for full coverage
  4. Avoid shadows - glass effect provides natural depth
  5. Use padding for content spacing within glass views

Accessibility

Check user preference for reduced transparency:

import { AccessibilityInfo } from 'react-native';
import { isLiquidGlassAvailable, GlassView } from 'expo-glass-effect';

const [reduceTransparency, setReduceTransparency] = useState(false);

useEffect(() => {
  AccessibilityInfo.isReduceTransparencyEnabled().then(setReduceTransparency);
}, []);

const shouldUseGlass = isLiquidGlassAvailable() && !reduceTransparency;

References

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View