纯代码UI动效循环动画

本页出自 Jason Zhu(jasonzhu.ai)整理的Claude 5.5 提示词库:收录 X 上公开帖子里用 Claude 做的作品,作者公开的提示词原文照录,并链接到出处。

查看完整提示词 ↓
播放
1.5万
点赞
161
评论
10
收藏
198

一段完全用代码渲染而非After Effects制作的UI动态设计循环视频,基于作者公开的Claude Opus 5.5结构化提示模板(规定UI状态、弹簧动画和节拍同步剪辑),使用Playwright和ffmpeg渲染。

完整提示词2,757 字符

<inputs>
Ask me for: 8 to 12 UI states I want the shape to transform into (e.g. button, loader, player, slider, toggle, tabs, chart, command palette, toast), pure black and white or one accent color, and a royalty-free song around 120 BPM (e.g. Mixkit, free for commercial use).
</inputs>

<direction>
Dribbble-level UI motion. One shape, no cuts: every state is the same element morphing its size, radius and color while its content swaps with a quick blur.
A cursor controls every change with real clicks and drags. Light warm-gray canvas, black and white components, one clean UI font (Geist).
Springs everywhere, with only a tiny overshoot. The camera zooms so each state fills the entire frame. The last frame matches the first frame, so it loops perfectly.
Banned: bouncy easing, particle bursts, glows, gradients on UI chrome, mismatched icon strokes, dead time, anything that looks like a template.
</direction>

<structure>
120 BPM, 7 bars, something happens on every beat.
Button → loader → check → dynamic island → music player with a play/pause morph → scrub the progress bar → it becomes a volume slider that stretches when dragged past max → a toggle flips on the beat → the knob becomes a liquid tab indicator → the tabs expand into a chart that draws itself, with a tooltip on hover → it collapses into ⌘K → type to filter → enter → toast → back to the button.
</structure>

<build>
One HTML file, square 1440x1440. Every style is calculated from time inside seek(t): no CSS transitions, no timers, no state carried between frames.
Springs use closed-form step responses. A value that changes targets multiple times is the sum of one spring per change, so it remains a pure function of time.
The tab indicator's two edges follow different springs, so the leading edge stretches ahead of the trailing one. Use the same trick for the toggle knob.
Drags use direct manipulation: while the cursor is held, the value is calculated from its position. On release it springs back from wherever it was.
Analyze the song with numpy to find the beat grid and start on a downbeat. Position every UI sound by its measured peak.
Render with Playwright: 4 subframes per frame, blended with ffmpeg tmix for motion blur at 60fps.
Render one frame per beat before the full render. Fix anything off the grid, cramped or difficult to read.
</build>

<gotchas>
Never put will-change on anything the camera scales or the text becomes blurry.
Text that swaps inside a morphing container needs its own enter and exit timing or it overlaps.
Make the final frame identical to the first, including cursor position and speed, or the loop stutters.
</gotchas>

<start>
Ask me for the inputs, then show me the state list on the beat grid before writing any code.
</start>

出处:原帖正文。提示词保留原文语言,未做改写。

📬

订阅 Newsletter,免费获取完整手册

订阅即送《AIP出海自媒体实战手册》完整版(下载链接发到邮箱),还有每周AI精选内容推送

我们尊重你的隐私,不会发送垃圾邮件。可随时退订。

作者提到的工具

原帖:https://x.com/0xAiky/status/2111814234090693110

全部作品数据开源在 GitHub · awesome-opus-5.5-video。

模型归属以作者自述为准,本站未独立复现。播放量为 2026-12-05 的快照。作品版权归原作者,修改署名或下架请在 X 私信 @GoSailGlobal。

更多动效设计案例

核心 GEO 数据与开源研究

出海独立开发者的 AI 搜索实证榜、论文与诊断工具