Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计提醒

expo-glass-effect世博会玻璃效果

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

220

周安装

9

GitHub Stars

公开资料未说明

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:expo-glass-effect(世博会玻璃效果)
来源仓库:https://github.com/jchaselubitz/drill-app
仓库路径:skills/expo-glass-effect
安装命令:
npx skills add https://github.com/jchaselubitz/drill-app --skill expo-glass-effect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jchaselubitz/drill-app --skill expo-glass-effect

简介

创建 iOS 原生的液态玻璃视觉效果,基于 UIVisualEffectView 实现。

  • 支持交互式模糊背景与多种色调模式,自动降级至普通 View 兼容旧设备。
  • 适用于模态弹窗、操作面板等需要视觉层次感的界面元素。
  • 仅限 iOS 26+ 系统,其他平台将回退为标准容器组件表现。
  • expo-glass-effect 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.24%
按下载量换算25

Claude

28.62%
按下载量换算20

Cursor

20.55%
按下载量换算15

Gemini CLI

8.76%
按下载量换算6

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills