环境音混音器与专注状态
深色冥想 App,蓝、绿、灰色弥散光与漂浮星点。状态页左右滑切九种状态,混音页开关声音、拖音量并滚动列表,弹层选计时时长。HTML 与 React Native 共用 core。
灵感来自 RedNote 上的一条帖子由 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 "ambient-sound-mixer-and-focus-states" to this project. The full source is attached at the end of this prompt. Put the files under components/ambient-sound-mixer-and-focus-states/, 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 作品。提示词包含完整源码。开始使用
详情
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个深色环境音应用屏幕,包含三个视图。第一个是状态页,可横向滑动切换九种情绪,例如专注、疗愈和冥想。每种情绪都会改变大面积的柔和背景光、间距较大的大写标题、城市和天气信息行,以及一个频率胶囊;下方有九个分页点,周围还有缓慢漂移的星点。第二个是混音器,包含一个可滚动的十二张声音卡片网格,每张卡片有一个开关和一个可拖动的音量滑块。点按频率胶囊会打开计时面板,选择时长后面板关闭。
实现方式
共享的 JavaScript 核心以点为单位,把每个场景描述为一个显示列表;React Native 组件用 react-native-svg 渲染,包括光晕、星点和玻璃卡片。滑动、拖动滑块和滚动使用 PanResponder,场景切换则在 requestAnimationFrame 循环中推进,没有使用 Reanimated。文字宽度来自一个小型查找模块,图标来自路径表。光晕、星点和玻璃效果都由代码生成,没有使用源文件中的位图。
适用场景
- 基于情绪切换背景的冥想、睡眠或专注应用
- 需要为多个循环声音各自设置开关和音量的混音页面
- 多个全屏状态共享同一布局的可翻页模板
依赖
react-native-svgreact-native标签
底部弹层卡片深色光效辉光渐变音乐音频滑杆柔和治愈滑动手势开关