用好连续性,让你的产品更丝滑。 连续性指的是:界面状态变化时,用户点到的元素不会消失再重新出现,而是直接过渡成下一个状态,让人始终清楚自己从哪里来、现在在哪里。这次用 iOS 里几个常见的场景,完整演示一遍: - 导航:行标题延续为页面标题,原标题收为返回按钮;滚动时,标题收入顶栏 - 卡片:卡片展开为正文,图片延展为头图;下拉时,沿原路收回 - 播放器:迷你播放条展开为播放页,封面、标题与按钮各归其位 - 搜索:搜索框移至顶部,匹配项随输入上移,其余淡出 - 图表:数据卡片展开为图表,卡片中的小柱延续为图表的柱 - 菜单:菜单自按钮原位展开;新增项落入首位,其余依次后移 - 标签栏:选中胶囊先伸展,再落位 附一条 Prompt:它会先诊断你的产品,找出值得做连续性的地方,再给出具体的改造方案。完整 Prompt 见评论,可以直接复制。
枯白啃设计

图标设计师 / 设计工程师

Prompt(2/3) h. Layout changes: grid to list, sort, reorder, insert, delete, expand and collapse. Continuous: each item moves from where it was to where it goes; items that change row leave at the end of their row and come in at the start of the next, so nothing crosses the grid. 2. How to make it continuous - One element, not two. The thing that moves is the same element (or a shared element the framework matches by id), measured where it starts and where it ends. Animate between the two boxes with transforms; never animate width, height, top or margin on things that reflow. - What only one state has fades: content that exists only at the end fades in after about 45-55% of the move, and content that exists only at the start fades out in the first 25-35%. Text that changes size scales; it is not cross-faded with a copy. - Keep layers honest: a panel that grows is opaque all the way, so nothing shows through it; the moving element stays above its neighbours while it moves, and goes back to its place in the stack when it lands. - Shapes keep their corners: the radius changes smoothly between start and end, using the product's own corner curve. Nested shapes keep equal padding and concentric corners. - Timing: open and close with a fast start and a long settle, cubic-bezier(.32, .72, 0, 1) or the product's own spring. Phones: 450-700ms for something that becomes a full screen, 350-500ms for menus and sheets, 400-450ms for an indicator. Desktop: about two thirds of that, and shorter still when it was triggered from the keyboard. Moves within a screen use ease-in-out. Staggers stay between 20 and 50ms. - Gestures: while a finger or the pointer drags, follow it 1:1 (a dragged card shrinks to about 0.82 as it goes); on release, finish with the release velocity, toward whichever end is nearer. - Interruptions: a new action takes over from wherever the animation is; nothing waits for an animation to finish, and input is never blocked. - Reduced motion: keep the change of state and a short cross-fade (about 150ms), drop the movement and scaling. - Accessibility: focus moves to the new state's heading or first control, and back to the element that opened it when it closes; screen readers announce the new state as they do now. 3. Phone and desktop - Phone: everything above, with gestures (swipe back, drag to dismiss) driving the same animation as the buttons, and safe areas respected at every frame. - Desktop: the same patterns, smaller and quicker. A card or row usually opens into a side panel or dialog rather than a full window; grow it from the card into that panel. Do not zoom whole windows. Hover never starts a layout animation. Keep pointer targets in place while they animate, so a second click lands where it aims. In split views, animate inside the pane that changes. - Window resizing and responsive breakpoints are not transitions; do not animate them. 4. Report before building Go through the product and give me a ranked list, at most 10 entries, each with: - Where: the screen or component, and the action that triggers it (on phone, desktop or both). - Now: what happens today, in one line. - Pattern: which of a-h it is, and which element should carry over. - Change: what moves to where, the duration and curve, in two or three lines. - Value: high, medium or low, from how often people do it and how lost they could get without it. - Cost: what has to change in the code, and any risk (routing, virtualized lists, shared state). Put the frequent, disorienting ones with low cost first. Then ask me which ones to build and wait. 5. Build what I pick - Describe the approach for each on my platform (section 6 is a starting point), and list the files you will touch. Wait for my go-ahead. - Build them one at a time. For each, list the files you touched, and check: - The first and last frame match the real states exactly; nothing jumps when the moving element hands over to the real one. - Real data: long and short text, missing images, the first and last item, an empty list, a scrolled list. - Fast repeated taps or clicks, going back during the animation, and gestures cancelled half way. - Phone and desktop layouts, light and dark, reduced motion, keyboard and screen reader. - At rest every screen looks exactly as before, and existing tests still pass. 6. How, by platform (check against my versions)
登录并发表评论

评论 · 0