食物扫描相机引导页
餐食照片上有四角扫描框;在食物、条码、标签和相册模式间切换时扫描框变形,底部面板用 Next 按钮依次展示四步简短提示。HTML 与 React Native 共用版式和时间线。
灵感来自 @crevioagency 在 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 "food-scan-camera-onboarding" to this project. The full source is attached at the end of this prompt. Put the files under components/food-scan-camera-onboarding/, 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年11月20日
- 许可证
- 无限商业项目
- 原始设计
- @crevioagency(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个浅色模式的首次使用屏幕,讲解如何扫描一餐。相机区域中是一张寿司照片,外围有四个圆角取景括号,以及一个去掉四角的点阵网格。下方一排药丸用于选择模式:扫描食物、条形码、食品标签和相册;选择某一项后,扫描框会变成新的形状,条形码为宽框,标签为高框。一道浅色扫光会定期掠过取景框。标题和三行图标说明本步骤。点击“Next”会依次经过四个步骤,标题和行随之变化,最后一个按钮写着“Start Scanning”,“Skip”控件会直接跳到最后一步。药丸和按钮在点击时会短暂下压。
实现方式
布局、文案、四种模式及其框体尺寸、四个步骤以及所有时序常量都放在一个共享的 JavaScript 文件中,网页预览和组件共用。组件用 react-native-svg 绘制括号、点阵、图标和扫光遮罩,用 expo-blur 实现磨砂药丸和按钮区域,并通过 Expo 字体包加载三种 Manrope 字重。框体变化使用 ease-in-out 曲线在半秒内对矩形进行插值。requestAnimationFrame 循环提供时间,props 可用于跳过引导或冻结某一时刻。
适用场景
- 食物、营养或库存应用中扫描器之前的相机权限或操作说明屏幕
- 可变形取景框的模式选择器
- 带跳过操作的多步骤提示轮播
依赖
react-native-svgexpo-blur@expo-google-fonts/manropereact-native标签
按钮相机取景美食菜谱健康健身浅色引导页转场状态切换