按住说话的极光语音搜索
按住麦克风,极光背景升起并随状态变色,转写逐词对焦。松手后辉光加载态逐字显示状态,结果卡带波纹升起并折叠收成卡堆。SkSL 与 GLSL 共用一个着色器。
灵感来自 @handhelddesign 在 X 上发布的设计由 Now In Code 从零重建
import { Piece } from "./components";
export function Example() {
const progress = useSharedValue(0);
…
export function Example() {
const progress = useSharedValue(0);
…
Agent 提示词
Add the Now In Code component "hold-to-speak-aurora-voice-search" to this project. The full source is attached at the end of this prompt. Put the files under components/hold-to-speak-aurora-voice-search/, install the listed dependencies with `npx expo install`, and render it on a route I can open. Keep the timing and easing values documented in the source comments. Replace the sample copy and artwork with content from my app, or leave placeholders and list what I still need to supply. === Source files are attached here for paid plans ===
Pro 作品。提示词包含完整源码。开始使用
详情
- 平台
- iOS、Android
- 依赖
- Expo SDK 54+
- 权限
- Pro
- 更新于
- 2026年10月16日
- 许可证
- 无限商业项目
- 原始设计
- @handhelddesign(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
影视剧集浏览器的语音搜索界面。待机时是深色卡片堆叠,背后有蓝、绿、橙色的极光缓缓漂移,并有“Hold to speak”提示。长按大麦克风按钮时,色彩转向青、紫和桃色,转写文字逐词出现并逐渐清晰。松手后画面变暗,一道发光轮廓沿黑色区域描边,一个加载词逐字母淡入。底部的极光和按钮回来,结果卡片从底部扇形升起,一道白色涟漪扫过屏幕。滑动切换卡片时,前面的卡片向上边缘折回,后面的海报交叉淡入。搜索和筛选的玻璃按钮位于麦克风两侧。
实现方式
极光是单通道解析着色器:三个高斯颜色混合横跨屏幕,加上正弦扭曲、垂直 smoothstep 升起、高光,以及用于外发光轮廓的圆角矩形距离场。同一段函数体在网页预览中编译为 GLSL,在 React Native 中编译为 Skia RuntimeEffect 的 SkSL。为了让两种渲染器结果一致,它避开了哈希噪声。共享核心保存状态机和逐帧函数,时钟是 requestAnimationFrame 循环。文字模糊和玻璃效果由 expo-blur 与渐变实现,图标使用 react-native-svg。
适用场景
- 带长按说话按钮的语音搜索或助手入口界面
- 以卡片堆叠形式展示结果的影视或购物应用
- 无需视频、随聆听或待机等状态变化的背景
依赖
@shopify/react-native-skiaexpo-blurexpo-linear-gradientreact-native-svgreact-native标签
3D 旋转AI 助手模糊过渡按钮卡片卡片堆叠交叉淡化深色拖拽电商购物流体光效辉光渐变图标液态玻璃加载动画长按形变霓虹科技物理模拟按压反馈内容阅读涟漪着色器弹簧错峰入场状态切换滑动手势文字动画语音助手