{"summary":"Sete curvas de velocidade comuns para animações, de Linear a Spring, e o tipo de movimento a que cada uma se adapta.","notes":"<p>O ritmo de uma animação é descrito por uma curva de velocidade: quanto mais íngreme a curva, mais brusca a mudança de velocidade e mais rápido o movimento parece. Se o menu que abre, o diálogo que fecha e o indicador que desliza usam todos o <code>ease</code> padrão, o usuário não distingue se um elemento está aparecendo, sumindo ou mudando de lugar. As curvas mais usadas são estas:</p>\n        <ol>\n        <li><strong>Linear</strong>: para barras de progresso, carregamentos e outras coisas que só precisam parecer “em andamento”. Movimento uniforme, com início e fim bruscos, <code>linear</code>.</li>\n        <li><strong>Ease-out e Strong ease-out</strong>: na entrada de sobreposições e elementos modais, como toasts, menus, diálogos e painéis laterais, usa-se Ease-out, rápida no começo e lenta no fim, <code>cubic-bezier(0, 0, .58, 1)</code>. Para elementos pequenos que se encaixam logo depois de um clique, como ícones, texto ou uma pílula selecionada, usa-se Strong ease-out, que arranca mais rápido e desacelera por mais tempo, <code>cubic-bezier(.22, 1, .36, 1)</code>; é a resposta mais direta.</li>\n        <li><strong>Ease-in</strong>: para saídas, como o fechamento de um diálogo ou um toast que some. Lenta no começo e rápida no fim, sai sem rodeios, <code>cubic-bezier(.42, 0, 1, 1)</code>. Não use em entradas: o início lento faz a interface parecer demorar para responder.</li>\n        <li><strong>Ease-in-out</strong>: para elementos que mudam de lugar dentro da interface, como o indicador sob as abas, a troca de página de um carrossel ou a rolagem suave até uma seção do índice. Lenta nas pontas e mais rápida no meio, <code>cubic-bezier(.42, 0, .58, 1)</code>.</li>\n        <li><strong>Overshoot</strong>: para confirmações pequenas e divertidas, como marcar uma caixa, curtir ou um selo que aparece. Passa do ponto final em cerca de 10% e volta, <code>cubic-bezier(.34, 1.56, .64, 1)</code>. Não use em painéis grandes, senão a interface inteira balança.</li>\n        <li><strong>Spring</strong>: para devolver algo ao lugar depois de soltar, como o retorno de um painel lateral, puxar para atualizar ou o encaixe depois de reordenar por arrasto. Ao chegar, balança uma ou duas vezes antes de parar, mais parecido com um objeto real do que o Overshoot; quando o usuário solta, o elemento já tem velocidade, e a mola continua a partir dela.</li>\n        </ol>\n        <p>Além disso, definindo essas curvas como tokens de movimento e usando cada uma conforme sua função, o produto inteiro mantém o mesmo ritmo.</p>\n        <p>O prompt que acompanha esta dica lista primeiro todas as transições e animações do projeto, marca onde ainda se usa o ease padrão ou um ease-in numa entrada, e qual curva usar em cada caso; depois acrescenta os tokens de movimento e ajusta uma a uma as curvas e as durações.</p>","prompt":"Give the motion in my product the right easing curves, so things arrive, leave and move the way they should feel. Work inside my existing code and design system: keep what each animation does, how far it goes and what triggers it. Change how it moves over time, and its duration where that is off.\n\n0. Start from what exists\n- Find every transition and animation: CSS transitions and keyframes, animation libraries (Framer Motion, GSAP, the Web Animations API) and hand-written requestAnimationFrame loops. List each with its component, its trigger, its duration and its curve.\n- Flag the ones left on the CSS default `ease`, `linear` on something that moves, and `ease-in` on something that appears.\n\n1. The curves as tokens\nDefine them once, next to the other motion tokens, and use only these:\n- --ease-out: cubic-bezier(0, 0, .58, 1). Anything that enters: toasts, menus, popovers, dialogs, drawers.\n- --ease-out-strong: cubic-bezier(.22, 1, .36, 1). Small parts settling in right after a click: an icon, a label, a selected pill. It feels the most responsive.\n- --ease-in: cubic-bezier(.42, 0, 1, 1). Anything that leaves, and only that: a toast timing out, a dialog or drawer closing, a menu collapsing, a list item swiped away. It starts slow and leaves at full speed, so on an entrance it feels late and then stops with a bump.\n- --ease-in-out: cubic-bezier(.42, 0, .58, 1). Something that stays on screen and only changes place or size: the indicator under tabs or a segmented control, a carousel turning a page, items making room during a reorder, a sidebar resizing, smooth-scrolling to an anchor. Not for coming in: its slow start reads as lag.\n- --ease-overshoot: cubic-bezier(.34, 1.56, .64, 1). Runs about 10% past its place and comes back. Small, playful confirmations: a checkbox tick, a like, a badge count popping in, a switch knob settling. Never on a dialog, a drawer or anything larger than about 64px, and not on actions people repeat all day.\n- --ease-spring: linear(0, .32, .78, 1.04, 1.09, 1.06, 1.02, 1, .99, .99, 1). Things let go after a drag or a swipe, so they settle like an object: a bottom sheet snapping open or back, a card returning after a half swipe, pull-to-refresh springing back, a reordered item dropping into place. Prefer the animation library's own spring fed with the release velocity; use this token only where there is none, and fall back to --ease-out-strong where linear() is not supported.\n- linear: only for things that run rather than move: spinners, progress bars, marquees.\n- The CSS default `ease` is not a choice. Replace it wherever a curve was left unset.\n\n2. Durations\n- Small UI (toasts, tooltips, menus, checks): 150-250ms in, 120-200ms out. Exits are shorter than entrances.\n- Medium (dialogs, popovers with content, drawers): 250-350ms.\n- Large or full-screen (sheets, page transitions): 350-500ms. Longer feels slow.\n- Springs and overshoots: about 1.5x the plain duration, since the settle takes time.\n- Keep the durations as tokens beside the curves (--duration-sm, -md, -lg).\n\n3. Apply them by role\n- Entrances: ease-out, coming from where the thing belongs (a toast from the top edge, a menu from its trigger), over a short distance (8-24px), growing from 96% and fading in a little sooner than it moves. A light blur (about 8px) that clears as it lands is a nice touch on toasts.\n- Exits: ease-in, the same path reversed, and shorter.\n- Moves on screen: ease-in-out.\n- Parts inside something that has just appeared (its icon, its text, a count) may follow 100-200ms later on the strong ease-out, so it lands in steps rather than all at once.\n- Gestures: while the pointer or finger moves, follow it 1:1 with no easing. On release, finish on the spring, from the release velocity if the library allows.\n- Hover and press: 100-150ms ease-out. Never animate layout on hover.\n- Animate transform and opacity (filter sparingly), not top, left, width or height, which lay out and repaint every frame.\n\n4. Keep it consistent and accessible\n- One curve per role across the product. Don't tune each component by hand.\n- Respect prefers-reduced-motion: keep the opacity changes, drop movement and scale, and turn springs and overshoots into a plain 150ms fade.\n- Never make a user wait on an animation: nothing blocks input, and a new action interrupts the old animation from where it is.\n\n5. Deliver\n- First list every animation you found, its current curve and duration, and the role and curve you will give it.\n- Then add the tokens, switch each animation over, and list every file you touched.\n- Don't change what animates, how far it goes or what triggers it. If an animation has no clear role, ask me first.","skill":"/skills/kubai-easing-curves/SKILL.md","skillText":"# 按场景选择缓动曲线\n\n《999 个小技巧，让你 Vibe 的产品更有质感》第 011 期 · @kubai087\n\n在用户的项目里按下面的要求改造。要求以用户的口吻写成：文中的 I、me、my 指用户；写着要先问的地方，先停下来问用户再继续。\n\n## 改造要求\n\nGive the motion in my product the right easing curves, so things arrive, leave and move the way they should feel. Work inside my existing code and design system: keep what each animation does, how far it goes and what triggers it. Change how it moves over time, and its duration where that is off.\n\n0. Start from what exists\n- Find every transition and animation: CSS transitions and keyframes, animation libraries (Framer Motion, GSAP, the Web Animations API) and hand-written requestAnimationFrame loops. List each with its component, its trigger, its duration and its curve.\n- Flag the ones left on the CSS default `ease`, `linear` on something that moves, and `ease-in` on something that appears.\n\n1. The curves as tokens\nDefine them once, next to the other motion tokens, and use only these:\n- --ease-out: cubic-bezier(0, 0, .58, 1). Anything that enters: toasts, menus, popovers, dialogs, drawers.\n- --ease-out-strong: cubic-bezier(.22, 1, .36, 1). Small parts settling in right after a click: an icon, a label, a selected pill. It feels the most responsive.\n- --ease-in: cubic-bezier(.42, 0, 1, 1). Anything that leaves, and only that: a toast timing out, a dialog or drawer closing, a menu collapsing, a list item swiped away. It starts slow and leaves at full speed, so on an entrance it feels late and then stops with a bump.\n- --ease-in-out: cubic-bezier(.42, 0, .58, 1). Something that stays on screen and only changes place or size: the indicator under tabs or a segmented control, a carousel turning a page, items making room during a reorder, a sidebar resizing, smooth-scrolling to an anchor. Not for coming in: its slow start reads as lag.\n- --ease-overshoot: cubic-bezier(.34, 1.56, .64, 1). Runs about 10% past its place and comes back. Small, playful confirmations: a checkbox tick, a like, a badge count popping in, a switch knob settling. Never on a dialog, a drawer or anything larger than about 64px, and not on actions people repeat all day.\n- --ease-spring: linear(0, .32, .78, 1.04, 1.09, 1.06, 1.02, 1, .99, .99, 1). Things let go after a drag or a swipe, so they settle like an object: a bottom sheet snapping open or back, a card returning after a half swipe, pull-to-refresh springing back, a reordered item dropping into place. Prefer the animation library's own spring fed with the release velocity; use this token only where there is none, and fall back to --ease-out-strong where linear() is not supported.\n- linear: only for things that run rather than move: spinners, progress bars, marquees.\n- The CSS default `ease` is not a choice. Replace it wherever a curve was left unset.\n\n2. Durations\n- Small UI (toasts, tooltips, menus, checks): 150-250ms in, 120-200ms out. Exits are shorter than entrances.\n- Medium (dialogs, popovers with content, drawers): 250-350ms.\n- Large or full-screen (sheets, page transitions): 350-500ms. Longer feels slow.\n- Springs and overshoots: about 1.5x the plain duration, since the settle takes time.\n- Keep the durations as tokens beside the curves (--duration-sm, -md, -lg).\n\n3. Apply them by role\n- Entrances: ease-out, coming from where the thing belongs (a toast from the top edge, a menu from its trigger), over a short distance (8-24px), growing from 96% and fading in a little sooner than it moves. A light blur (about 8px) that clears as it lands is a nice touch on toasts.\n- Exits: ease-in, the same path reversed, and shorter.\n- Moves on screen: ease-in-out.\n- Parts inside something that has just appeared (its icon, its text, a count) may follow 100-200ms later on the strong ease-out, so it lands in steps rather than all at once.\n- Gestures: while the pointer or finger moves, follow it 1:1 with no easing. On release, finish on the spring, from the release velocity if the library allows.\n- Hover and press: 100-150ms ease-out. Never animate layout on hover.\n- Animate transform and opacity (filter sparingly), not top, left, width or height, which lay out and repaint every frame.\n\n4. Keep it consistent and accessible\n- One curve per role across the product. Don't tune each component by hand.\n- Respect prefers-reduced-motion: keep the opacity changes, drop movement and scale, and turn springs and overshoots into a plain 150ms fade.\n- Never make a user wait on an animation: nothing blocks input, and a new action interrupts the old animation from where it is.\n\n5. Deliver\n- First list every animation you found, its current curve and duration, and the role and curve you will give it.\n- Then add the tokens, switch each animation over, and list every file you touched.\n- Don't change what animates, how far it goes or what triggers it. If an animation has no clear role, ask me first.\n"}