计划选择订阅付费墙
蓝色渐变顶部带徽章、头像簇和月桂枝,下方是计划卡和两张价格卡,点按时 2pt 选中描边交叉淡化,带 Best deal 角标。深浅主题共用一份 core。
灵感来自 @Babayanski_12 在 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 "plan-selector-subscription-paywall" to this project. The full source is attached at the end of this prompt. Put the files under components/plan-selector-subscription-paywall/, 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月28日
- 许可证
- 无限商业项目
- 原始设计
- @Babayanski_12(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
健身订阅付费墙,提供深色和浅色两种主题。蓝色渐变头部带有徽章、一排会员头像,两侧各有一根月桂枝。其下是方案摘要卡片和两张价格卡,分别为 Weekly 和 Yearly,年付卡上有“Save 90% - Best deal”标签。点按价格卡时,卡片按下会轻微缩小,并交叉淡入蓝色的选中轮廓。主按钮按下时会收缩,返回箭头会变暗。回调会报告所选方案和订阅点击。
实现方式
一个普通的 JavaScript 核心保存两套主题、以点为单位的几何数据、文字表,以及一个 scene 函数,该函数针对当前状态返回显示列表。React Native 组件用 react-native-svg 渲染列表中的渐变、形状、图标和星形,并用 Image 与 Pressable 处理照片和月桂枝。轮廓的交叉淡入是一个短的 requestAnimationFrame 循环,使用 ease-out 曲线,因此除 SVG 外不需要原生模块。文字按基线定位,并针对 iOS 字体行为对每个字符串进行字距补偿。界面按 393×852 点布局,并按窗口宽度缩放。
适用场景
- 健康或健身应用中的每周与每年订阅方案
- 由一个主题属性驱动的深色与浅色付费墙
- 任何两方案定价选择的起始布局,并突出最划算的选项
依赖
react-native-svgreact-native标签
头像徽章奖章按钮卡片交叉淡化深色光效辉光渐变健康健身图标浅色极简付费墙按压反馈个人主页进度条弹簧状态切换