Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Official Expo team skill for building native UI in Expo apps, fine-tuned for Opus models and usable with Claude Code or Cursor.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/visual-effects.md
1# Visual Effects23## Backdrop Blur45Use `expo-blur` for blur effects. Prefer systemMaterial tints as they adapt to dark mode.67```tsx8import { BlurView } from "expo-blur";910<BlurView tint="systemMaterial" intensity={100} />;11```1213### Tint Options1415```tsx16// System materials (adapt to dark mode)17<BlurView tint="systemMaterial" />18<BlurView tint="systemThinMaterial" />19<BlurView tint="systemUltraThinMaterial" />20<BlurView tint="systemThickMaterial" />21<BlurView tint="systemChromeMaterial" />2223// Basic tints24<BlurView tint="light" />25<BlurView tint="dark" />26<BlurView tint="default" />2728// Prominent (more visible)29<BlurView tint="prominent" />3031// Extra light/dark32<BlurView tint="extraLight" />33```3435### Intensity3637Control blur strength with `intensity` (0-100):3839```tsx40<BlurView tint="systemMaterial" intensity={50} /> // Subtle41<BlurView tint="systemMaterial" intensity={100} /> // Full42```4344### Rounded Corners4546BlurView requires `overflow: 'hidden'` to clip rounded corners:4748```tsx49<BlurView50tint="systemMaterial"51intensity={100}52style={{53borderRadius: 16,54overflow: 'hidden',55}}56/>57```5859### Overlay Pattern6061Common pattern for overlaying blur on content:6263```tsx64<View style={{ position: 'relative' }}>65<Image source={{ uri: '...' }} style={{ width: '100%', height: 200 }} />66<BlurView67tint="systemUltraThinMaterial"68intensity={80}69style={{70position: 'absolute',71bottom: 0,72left: 0,73right: 0,74padding: 16,75}}76>77<Text style={{ color: 'white' }}>Caption</Text>78</BlurView>79</View>80```8182## Glass Effects (iOS 26+)8384Use `expo-glass-effect` for liquid glass backdrops on iOS 26+.8586```tsx87import { GlassView } from "expo-glass-effect";8889<GlassView style={{ borderRadius: 16, padding: 16 }}>90<Text>Content inside glass</Text>91</GlassView>92```9394### Interactive Glass9596Add `isInteractive` for buttons and pressable glass:9798```tsx99import { GlassView } from "expo-glass-effect";100import { SymbolView } from "expo-symbols";101import { PlatformColor } from "react-native";102103<GlassView isInteractive style={{ borderRadius: 50 }}>104<Pressable style={{ padding: 12 }} onPress={handlePress}>105<SymbolView name="plus" tintColor={PlatformColor("label")} size={36} />106</Pressable>107</GlassView>108```109110### Glass Buttons111112Create liquid glass buttons:113114```tsx115function GlassButton({ icon, onPress }) {116return (117<GlassView isInteractive style={{ borderRadius: 50 }}>118<Pressable style={{ padding: 12 }} onPress={onPress}>119<SymbolView name={icon} tintColor={PlatformColor("label")} size={24} />120</Pressable>121</GlassView>122);123}124125// Usage126<GlassButton icon="plus" onPress={handleAdd} />127<GlassButton icon="gear" onPress={handleSettings} />128```129130### Glass Card131132```tsx133<GlassView style={{ borderRadius: 20, padding: 20 }}>134<Text style={{ fontSize: 18, fontWeight: '600', color: PlatformColor("label") }}>135Card Title136</Text>137<Text style={{ color: PlatformColor("secondaryLabel"), marginTop: 8 }}>138Card content goes here139</Text>140</GlassView>141```142143### Checking Availability144145```tsx146import { isLiquidGlassAvailable } from "expo-glass-effect";147148if (isLiquidGlassAvailable()) {149// Use GlassView150} else {151// Fallback to BlurView or solid background152}153```154155### Fallback Pattern156157```tsx158import { GlassView, isLiquidGlassAvailable } from "expo-glass-effect";159import { BlurView } from "expo-blur";160161function AdaptiveGlass({ children, style }) {162if (isLiquidGlassAvailable()) {163return <GlassView style={style}>{children}</GlassView>;164}165166return (167<BlurView tint="systemMaterial" intensity={80} style={style}>168{children}169</BlurView>170);171}172```173174## Sheet with Glass Background175176Make sheet backgrounds liquid glass on iOS 26+:177178```tsx179<Stack.Screen180name="sheet"181options={{182presentation: "formSheet",183sheetGrabberVisible: true,184sheetAllowedDetents: [0.5, 1.0],185contentStyle: { backgroundColor: "transparent" },186}}187/>188```189190## Best Practices191192- Use `systemMaterial` tints for automatic dark mode support193- Always set `overflow: 'hidden'` on BlurView for rounded corners194- Use `isInteractive` on GlassView for buttons and pressables195- Check `isLiquidGlassAvailable()` and provide fallbacks196- Avoid nesting blur views (performance impact)197- Keep blur intensity reasonable (50-100) for readability198