EN
全屏预览
Cairn 拟物青瓷保险库印章交互组件
一句话装进 Agent · 极速上手 Free Commercial · 无需绑卡 · 无试用倒计时
Claude Code Cursor Codex Antigravity OpenClaw
基于 Motion3D 原创 3D 网页蓝图「Cairn 拟物青瓷保险库印章交互组件」(https://motion3d.dev/works/cairn-seal/):把自包含源码 ZIP 解压到 ./site,完整保留 60fps Vanilla JS / CSS3 + HTML5 动效骨架,替换为我的品牌文案、Logo 与主题色
免费商用永久有效 · 复制指令交给你的 Agent,免登录直接下载源码包解压即可开跑。
工艺拆解与配色
生产级英文提示词 · 6614 字符
Build **Cairn**, a tactile, ceramic-minimalist interactive vault-sealing control inspired by Braun hardware switches and pale Kyoto celadon stoneware. Presented as a pure, distraction-free full-viewport studio piece (`100vw × 100vh`), the widget centers a soft-skeuomorphic porcelain pill button above a single muted status line and executes a five-stage physical state machine—idle rest, tactile pointer press, milled recessed batch progress with organic network bursts, two-stage checkmark-glide confirmation, and downward return to idle. ### Visual Aesthetic, Studio Lighting & Exact Palette Render the full-viewport canvas with a seamless radial studio spotlight centered behind the button: luminous pale celadon-porcelain `#EEF2EC` in the core halo, stepping gently through `#E5ECE2` and `#E0E8DB` to mist-sage corners `#DBE5D8`. Position the centered vertical stack (pill + status caption) slightly above mathematical center so the pill midpoint sits around 45.5% of viewport height for ideal optical balance. Construct the capsule button at `362px × 126px` on desktop (`2.87:1` aspect ratio, `border-radius: 9999px`, scaled smoothly on smaller screens without altering proportions) with multi-layered soft-skeuomorphic hardware lighting: - **Convex Ceramic Body**: Subtle top-to-bottom surface gradient `#ECF3E9` (upper dome) → `#E5EDE0` (mid face) → `#DEE7DA` (lower belly), enclosed by a razor-thin `#E4EBE4` outer edge seam. - **Top Specular Glaze**: Crisp upper inner highlight (`inset 0 2px 2px #F7FEF7`, `inset 0 1px 0 rgba(255,255,255,0.92)`) paired with a delicate diffuse ambient glow directly behind the upper rim. - **Layered Contact Drop Shadow**: Multi-stop soft bottom elevation (`0 2px 4px rgba(176,188,174,0.45)`, `0 12px 22px -4px rgba(185,196,182,0.55)`, `0 22px 36px -6px rgba(196,206,193,0.45)` anchored by contact tone `#C8D0C6`) with ~28px smooth vertical feathering. - **Milled Recessed Progress Track (`272px × 16px`, `border-radius: 9999px`)**: Concave groove floor `#D6DED3` sculpted with a dark upper carved inset shadow (`inset 0 2px 3px #B7C3B9`, `inset 0 1px 1px rgba(128,144,131,0.38)`) AND a crisp bright lower inner rim catch-light (`0 1.5px 0 #F9FCF4`, `inset 0 -1px 1px rgba(249,252,244,0.95)`) so the channel reads as physically milled into ceramic. - **Botanical Pine Accent**: Deep pine cylindrical progress fill (`linear-gradient(180deg, #456151 0%, #304C3B 45%, #253B2D 100%)`, core `#304C3B`) and matching `42px × 42px` circular confirmation badge (`#314B3C`) housing a crisp rounded-cap checkmark stroke (`#EDFCF0`, `2.8px` stroke width). ### Typography & Original Copy System Load Google Fonts `Plus Jakarta Sans` (500) and `Inter` (400, 500). - **Primary Capsule Label**: `29px` (proportional to pill), weight `500`, `-0.02em` tracking, deep forest-obsidian ink `#212920`. - Idle CTA: `"Seal vault"` - Confirmed Label: `"Sealed"` (paired to the right of the `42px` checkmark badge with a `14px` gap) - **Secondary Status Caption** (`52px` below capsule bottom edge): `17.5px`, weight `400`, muted olive-sage `#788076`, strictly styled with `font-variant-numeric: tabular-nums` so incrementing digits never shift horizontally. - Idle / Confirmed Caption: `"Vault · sealed just now"` - Active Progress Caption: `"Vault · {count} of 164"` (counting smoothly from `0` through milestones like `24 of 164` and `96 of 164` up to `164 of 164`). ### Five-Stage State Machine & Motion Choreography Implement a clean React/TypeScript (or vanilla JS) finite state machine (`idle → pressing → sealing → hold → confirmed → resetting → idle`) inside an `overflow: hidden` inner viewport mask within the capsule so every inner transition clips cleanly against the ceramic surface: 1. **Idle & Hover**: Capsule rests at `scale(1)`. Pointer hover adds subtle cursor affordance (`pointer`) and gentle specular lift with zero layout shift. 2. **Tactile Press (`0–200ms`)**: On click or `Enter`/`Space`, depress the capsule (`scale(0.98)`, `translateY(2px)`) while compressing its bottom drop shadow by ~35%. Immediately swap the status caption to `"Vault · 0 of 164"`. 3. **Upward Slot Morph & Organic 3-Burst Progress (`~2.5s`)**: On release, rebound the capsule to `scale(1)`. Slide `"Seal vault"` upward out of the mask (`translateY(0 → -26px)`, `opacity: 1 → 0`, `filter: blur(4px)`, `200ms`) while the recessed track rises from below (`translateY(+26px → 0)`, `opacity: 0 → 1`, spring `stiffness: 340, damping: 28`). Drive progress from `0%` to `100%` over `2.35s` via `requestAnimationFrame` along a non-linear 3-burst piecewise curve—Burst 1 (`0% → 22%`, `420ms`), micro-pause trickle (`22% → 25%`, `380ms`), Burst 2 (`25% → 64%`, `580ms`), micro-pause trickle (`64% → 69%`, `380ms`), Burst 3 (`69% → 100%`, `590ms`)—updating `Math.round(progress * 164)` in lockstep with the bar. Hold at `100%` (`"Vault · 164 of 164"`) for `140ms`, then fade the counter out (`160ms`). 4. **Two-Stage Checkmark Pop, Leftward Glide & Blur-Reveal (`~2.3s`)**: Slide the filled track upward out of the mask (`180ms`). Immediately pop the `42px` pine checkmark circle upward from below into horizontal dead center (`translateY(+24px → 0)`, `scale(0.76 → 1)`, crisp spring settle) while drawing the SVG checkmark stroke (`stroke-dashoffset`). After an `80ms` centered pause, smoothly glide the circle leftward (`translateX(0 → -60px)` from pill center, `280ms`, `cubic-bezier(0.22, 1, 0.36, 1)`) while cross-fading the bottom caption back to `"Vault · sealed just now"`. As the badge settles on the left, materialize `"Sealed"` beside it using a Gaussian blur-to-sharp reveal (`filter: blur(7px) → blur(0px)`, `opacity: 0 → 1`, `translateX(8px → 0)`, `240ms`). Hold the confirmed state for `1.7s`. 5. **Downward Reset to Idle (`~340ms`)**: Reverse vertical direction—drop the `✓ Sealed` group downward out of the mask (`translateY(0 → +26px)`, `opacity: 0`, `blur(4px)`) while `"Seal vault"` descends softly from above (`translateY(-26px → 0)`, `opacity: 0 → 1`, spring settle), restoring interactive readiness. ### Engineering Quality & Accessibility Keep capsule geometry strictly immutable across states, animate exclusively GPU-composited properties (`transform`, `opacity`, `filter`), ignore duplicate clicks while active, expose `aria-live="polite"` status text for assistive technologies, and provide a clean `prefers-reduced-motion` fallback that cross-fades states cleanly without vertical travel or blur. Keep the viewport completely pure—no navbars, cards, or visual clutter—allowing users to trigger the cycle directly by clicking the capsule or pressing `Space`/`Enter`.
工艺拆解、动效栈与配色系统

原创设计理念

Cairn Seal 是一枚高度雕琢的青瓷质感交互印章开关,融合精细内高光阴影、机械阻尼弹跳与状态光晕,适合安全认证与高端会员权益触发点。

色彩系统(点击复制 Hex)

版式与区块架构

本作品为极致纯粹的单屏微交互组件展示(Single-Screen Interactive UI Showcase),无导航栏、无辅助卡片与多余装饰,100% 视觉焦点集中于居中实体化胶囊控件与底部状态说明: 1. **全屏柔光舞台(Full-Viewport Studio Stage)**: - `100vw × 100vh` 居中弹性布局,背景为平滑的中心亮、四角微暗的径向渐晕(`#EEF2EC` 渐变至 `#DBE5D8`),模拟摄影棚顶光柔光箱照射在青瓷哑光纸面上的自然空间感。 - 胶囊组件与副文案构成的纵向组合整体略微偏上,胶囊几何中心约位于视口高度 `45.5%` 处,使「胶囊 + 52px 间距 + 副文案」整体呈现完美的视觉重心平衡。 2. **核心实体胶囊组件(Tactile Porcelain Capsule)**: - 基准尺寸为 `362px × 126px`(宽高比约 `2.87:1`,基于 1402×876 对照画布),`border-radius: 9999px` 构成全圆角跑道形;小屏下按比例等比缩放,始终保持高宽比恒定。 - 内部设置 `overflow: hidden` 居中裁剪视口层,依次承载三种内部布局: - **待机态布局**:居中单行文案(`"Seal vault"`)。 - **进度态布局**:水平垂直居中的内凹圆角轨道(`272px × 16px`,左右留白各 `45px`)及内部圆柱体深绿进度填充条。 - **完成态布局**:水平居中的图文组合——左侧 `42px × 42px` 深松绿圆形对勾徽章 + `14px` 间距 + 右侧单字确认文案(`"Sealed"`)。 3. **底部状态副文案(Tabular Status Caption)**: - 位于胶囊底缘正下方 `52px` 处,单行居中排布,在静止/完成态展示时间戳状态(`"Vault · sealed just now"`),在执行态实时切换为等宽数字批量进度(`"Vault · 24 of 164"` → `"Vault · 164 of 164"`)。

动效与前端工程栈

核心技术栈可采用 **React / TypeScript + Framer Motion(或纯 CSS + requestAnimationFrame 弹簧物理引擎)+ 内联矢量 SVG**,无需 WebGL 即可通过高精度多层 CSS 光影与 GPU 合成动效达到工业级触感精度: 1. **五态有限状态机(Finite State Machine)**: - `idle` → `pressing`(按压下沉 `scale(0.98)` + `translateY(2px)` + 投影收敛,持续 ~200ms)→ `sealing`(槽道滑入 + 非线性三段突发进度,约 2.5s)→ `hold`(100% 满格短暂停顿 140ms)→ `confirmed`(进度条上滑退出 → 对勾居中弹入 → 左移滑行 280ms → 文案高斯模糊去雾显形 240ms → 静止展示 1.7s)→ `resetting`(反向向下落出 + 待机文案自上而下回位 340ms)→ `idle`。 - 交互期间屏蔽重复点击,支持键盘 `Enter` / `Space` 触发及 `aria-live="polite"` 辅助播报。 2. **非线性分批进度算法(Organic Multi-Burst Progress Engine)**: - 使用 `requestAnimationFrame` 驱动分段缓动进度函数:前段快速推进至 ~22% → 短暂微顿慢爬至 ~25% → 中段高速跃升至 ~65% → 第二次微顿慢爬至 ~69% → 尾段加速冲刺至 100%,同步计算 `Math.round(p * 164)` 更新底部计数,彻底消除机械匀速感。 3. **光学级软拟物着色技巧(Soft-Skeuomorphic CSS Lighting Rig)**: - 胶囊外凸质感由「纵向微渐变背景 + 1px 外缘接缝 + 顶缘 `#F7FEF7` 内高光 + 三层递进式外投影」叠加实现;内凹进度槽通过「顶部深青灰 `inset` 内阴 + 底部 `#F9FCF4` 锐利外/内高光反光边」翻转受光方向;深绿进度条则用纵向三色渐变(`#456151 → #304C3B → #253B2D`)模拟嵌入式圆柱实体。 4. **高斯模糊融合与性能约束**: - 仅动画化 `transform`、`opacity`、`filter`(`blur(0..7px)`)与 SVG `stroke-dashoffset`,避免触发布局重排;并提供 `prefers-reduced-motion` 降级分支(改为平滑淡入淡出,取消位移与模糊)。

工程实现要点与避坑指南

  • 内凹进度槽的「上暗下亮」双层光影不可省略:必须在槽体顶部施加深青灰内阴影(#B7C3B9),同时在槽体下缘施加 1–1.5px 高亮反光边(#F9FCF4),缺少底部受光边会让进度槽显得扁平、失去 CNC 陶瓷铣削凹槽的物理质感。
  • 外凸胶囊的高光与投影必须分层控制:顶缘需要极细的内高光釉面(#F7FEF7)配合顶部浅光晕,底部则需要近距接触暗影(#C8D0C6)叠加两层柔和漫散投影;按压态仅微缩至 scale(0.98) + 下沉 2px 并收紧投影扩散,切忌过度变形破坏克制感。
  • 严禁使用呆板的线性进度条:真实感来自「三段突发加速 + 两段短暂微顿」的分段非均匀曲线,并与底部计数器逐帧同步;到达 100% 后必须保留约 130–150ms 的满格停顿节拍,再切入完成态,避免视觉跳帧。
  • 完成态必须执行「两段式编排」而非整体淡入:满格进度条向上滑出后,圆形深绿对勾先从下方弹入胶囊正中央,停顿约 80ms 后平滑向左滑移腾出空间,右侧确认文案再以高斯模糊转清晰(blur 7px → 0px + opacity 0 → 1)浮现,这是整个微交互最具高级感的灵魂细节。
  • 状态切换的垂直动线具备严格方向语义:向前推进(待机→进度→完成)统一为「旧元素向上滑出、新元素自下而上进入」;而完成态自动复位回待机态时则反转方向(「旧元素向下落出、待机文案自上而下轻落回位」),赋予状态机清晰的空间心智模型。
  • 全程防抖与零布局偏移:胶囊外框宽高严格锁死,内部使用 overflow: hidden 视口遮罩承载位移动画;底部副文案必须启用 font-variant-numeric: tabular-nums,避免计数从 24 跳到 164 时整行文案左右抖动。

更多原创作品

更多3D 与交互工艺 →