Prompt(1/4)
Add a shockwave halo to my product: when something triggers it (by default, clicking or focusing the AI input), a faint halo of light sweeps across the page from one place and fades out, bending the page a few pixels as it passes, with a slight color split, in my dark and light modes. Build it inside my code and design system; do not change what the page does or how it looks at rest. Every value below is a default to start from, not a requirement.
First look at my app (section 0). Then ask me these one at a time, offering the default each time, and wait for each answer:
1. Trigger: what starts the halo (clicking or focusing the AI input, a keyboard shortcut, sending a message, the AI starting to answer, something else), and what happens if it is triggered again while one is running (restart, or ignore).
2. Origin: where it spreads from (the AI input, a button, the bottom edge of the page, the point that was clicked, the middle of a panel), and over which area (the page's content area, one panel, the whole window). Toolbars always stay clear.
3. Layers: the color rings (section 3) are always on; ask yes or no for each of the others: the bend (section 4), the color split, the refraction at the edges, the glints on lines and borders. The bend, the split and the refraction need the page as an image (section 6), so say what each costs on my platform.
4. Colors: one of the four palettes in section 3, or my brand colors (then derive four rings, and a dark and a light version, from them), and which modes my app has.
5. The input: leave my AI input as it is (the default), or turn it into the pill that springs open with a metal edge (section 1).
Then propose how you will build it on my platform (section 6 is a starting point, not a prescription), with the cost and any fallback, and wait for my go-ahead.
日更栏目《999 个小技巧,让你 Vibe 的产品更有质感》
✨ 013 有物理质感的冲击波(含扭曲与通道分离)
iOS 27.3 加入了屏幕边缘的跑马灯光效,也让我想起用 Dia 时,每次打开主页都会出现的光环冲击效果,于是尝试把两者结合。
完整 Prompt 见下方评论,可直接复制使用 ⬇️
该效果由 6 层组成:
1. 页面快照:将当前页面转为图像,作为后续各层的计算基础(可以借助 Chrome 新增的 HTML-in-Canvas)
2. 透镜扭曲:光环整体作为一个透镜,外侧拉伸、内侧压缩,表现空间被推开。
3. 通道分离:红、蓝通道的位移分别比绿色多、少 8%,在位移处形成轻微色散,同时保持文字清晰。
4. 色环:四道色环平滑过渡,随扩散逐渐淡出,决定光环的颜色与亮度。浅色模式为染色,深色模式为加光(screen 混合)。
5. 边缘折射:光环只在内容区内扩散。到达边缘时,内容如透过玻璃斜边向边缘轻微拉伸,窗框保持不变。
6. 边线反光:光环经过时,分割线与描边短暂提亮,深色模式下更弱,使页面结构也参与其中。
共 4 组配色:Aurora 蓝紫粉桃,Halo 橙黄,Frost 薄荷绿,Spark 紫金。