{"data":{"slug":"discovered-624884312773d1cb9b036ad4aa63d3ff5986cf318138a964","title":"Koi Animate \u2014 motion that explains","summary":"Adds motion to one route or component where it explains feedback, a state change, continuity, or one earned moment, using existing duration and easing tokens, Koi* overlays, and a reduced-motion path for every animation.","url":"https:\/\/skillshunter.net\/skills\/discovered-624884312773d1cb9b036ad4aa63d3ff5986cf318138a964","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-624884312773d1cb9b036ad4aa63d3ff5986cf318138a964","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-624884312773d1cb9b036ad4aa63d3ff5986cf318138a964.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-624884312773d1cb9b036ad4aa63d3ff5986cf318138a964\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure the route or component is classified as either Operate, Persuade, or Experience based on its purpose. Prepare a motion thesis outlining the focal moment, continuity, feedback, and cost before implementation. Use `prefers-reduced-motion` paths by including `motion-reduce:` in the className or using `@media` blocks in CSS.","instructions":"---\nname: koi-animate\ndescription: >\n  Adds motion to one route or component only where it explains feedback, a\n  state change, continuity, or one earned moment, using the existing duration\n  and easing tokens, the Koi* overlays that already animate, and a\n  reduced-motion path for every animation. Applies the change. Use for\n  \"\/koi-animate\", \"animate this\", \"add motion\", \"this needs a transition\",\n  \"it feels static when it changes\".\nargument-hint: \"<route or component>\"\n---\n\n# Koi Animate \u2014 motion that explains\n\nMotion is there to explain state, relationship and hierarchy, or to create one\nauthored moment the surface has earned. Decoration without purpose is\nanimation debt.\n\nThis skill **applies** the change. To only point at problems, use\n`koi-critique`.\n\n## Scope\n\n- One route, section or component, at the product's desktop viewport\n  (1440\u00d7900 by default; also the mobile layout if the product has one).\n- Every state State Mode registers for the screen\n  (`lib\/koi-states\/registry.ts`): the transition between states is often the\n  target itself.\n- Classify the surface as `koi-critique` does. On **Operate** screens motion\n  serves feedback, state and continuity: routine transitions are fast and\n  nobody waits for a loading choreography. An authored moment fits\n  **Persuade** and **Experience** surfaces: welcome, onboarding, empty states,\n  celebration.\n\n## Already solved \u2014 do not redo\n\nRead `AGENTS.md` \u2192 Stack & scope gotchas (motion and overlays):\n\n- **The paint transition is global.** Interactive elements get color,\n  background, border and shadow transitions from a `@layer base` rule in\n  `app\/globals.css`. Do not add `transition-colors` to every hover.\n- **Overlays animate on their own.** Modal, sheet, dropdown, mention menu,\n  toast and popover use the sanctioned primitive (`KoiModal`, `KoiSheet`,\n  `KoiDropdownMenu`, `KoiMentionMenu`, `KoiToast`, the `popover` primitive), with\n  enter and exit motion through Radix `data-state`. A conditional mount with\n  `fixed inset-0` loses its exit animation and is forbidden (`ds:check` flags\n  it).\n- **Sequential modals** change `stepKey` on `KoiModal` so the body re-animates\n  per step.\n- **Indeterminate work** uses `KoiSpinner`; progress uses `KoiProgress`.\n- **Enter and exit utilities** come from `tw-animate-css`. Never animate\n  `transform` or `opacity` globally: those are reserved for enter animations.\n\n## 1. Find the work\n\nLook at the motion language the area already uses, its interaction states and\nthe cost. Motion only goes where it:\n\n- acknowledges an action;\n- makes a state change or a spatial relationship legible;\n- preserves continuity through a navigation or a layout change;\n- directs attention at a moment that matters.\n\nAsk only when a material constraint cannot be deduced. Do not animate a static\narea just because it exists.\n\n## 2. Motion thesis\n\nWrite it before implementing:\n\n- **Focal moment:** the sequence that deserves authorship, if any.\n- **Continuity:** the state, layout or navigation changes that need explaining.\n- **Feedback:** the controls and results that need confirmation.\n- **Cost:** what may be expensive and how often it runs.\n\nThe focal moment comes from this product and this screen. A generic\nfade-and-rise, a hover that lifts, parallax or reveal-on-scroll is not a\nthesis.\n\n## 3. Material by meaning\n\nTransform and opacity are the reliable base, not the whole palette:\n\n- **Continuity and relationship:** a shared element, FLIP, a deliberate\n  spatial offset.\n- **Focus and depth:** blur, backdrop or shadow, contained to the region.\n- **Reveal and compose:** mask, `clip-path`, crop.\n- **State and feedback:** the smallest change that makes cause and result\n  unmistakable.\n\nNo stacking techniques for spectacle. One strong material idea at the focal\nmoment and quiet supporting states are enough. Stagger siblings only when a\nlist appears as a list, with a bounded total delay; never treat every\nscrolled section as a list.\n\n## 4. Time and curve: the tokens\n\nNever write a loose duration or curve. The tokens live in `app\/globals.css`,\nin two channels with the same values:\n\n| Use | className (`@theme`) | `var()` (inline, raw CSS) | Value |\n|---|---|---|---|\n| Immediate feedback | `duration-koi-fast` | `--dur-fast` | 120ms |\n| Routine state change | `duration-koi-base` | `--dur-base` | 180ms |\n| Layout, overlay, step change | `duration-koi-slow` | `--dur-slow` | 280ms |\n\n| Curve | className | `var()` | For |\n|---|---|---|---|\n| Standard exit | `ease-koi-out` | `--ease-out` | almost everything |\n| Confident arrival | `ease-fluid` | \u2014 | a focal entrance |\n| Symmetric | \u2014 | `--ease-in-out` | a looping or back-and-forth motion |\n\n- Exits are faster than entrances. Long feedback reads as latency.\n- No bounce or elastic by reflex.\n- An authored focal moment may run longer than 280ms. A duration or curve no\n  token covers, and that will repeat, is a token gap: report it, do not create\n  it (`koi-foundation-update`).\n\n## 5. Implement in the right runtime\n\n- **CSS** (transitions, keyframes, `tw-animate-css` utilities) for declarative\n  state and short sequences. Feature keyframes live in `app\/globals.css` next\n  to the feature's block, with their `@media (prefers-reduced-motion: reduce)`\n  beside them, like the neighbours.\n- The template ships **no motion library**. If an interaction genuinely needs\n  springs, interruption or layout animation that CSS cannot express, say so\n  and ask before adding a dependency. If the product already has one, use it;\n  never add a second.\n- Content is visible in the default state: a script that fails never hides\n  the screen.\n- Do not animate layout-moving properties (`width`, `height`, `top`, `left`,\n  margins) without reason. Use transform, FLIP or grid. Follow the local\n  pattern where the code already does so deliberately.\n- Blur, filter, shadow and canvas stay contained to a region. `will-change`\n  only while the animation runs.\n\n## 6. Accessibility and control\n\n- Every animation has a `prefers-reduced-motion` path with an intentional\n  alternative: `motion-reduce:` in the className, or the `@media` block in\n  CSS.\n- Reducing means less and softer, not everything off: remove the spatial\n  movement and keep the opacity, color and state transition that carry\n  meaning. Feedback that confirms an action stays legible.\n- A non-essential loop stops when it leaves the screen or the tab is hidden.\n- Keyboard: focus is never lost and never waits for an animation to finish.\n\n## 7. Verify\n\n- The focal moment is specific to this screen.\n- Each supporting animation explains feedback, a state or a relationship.\n- Interrupting and repeating work (double click, going back mid-transition).\n- The reduced path removes movement without erasing feedback or state.\n- Removing the animation would lose meaning, not only decoration.\n- Proportional validation: `npm run lint`, `npm run typecheck`, `npm test`\n  when the area has tests, `npm run ds:check -- <changed files>`.\n- In the running app (Playwright MCP): run the interaction, screenshot the\n  frames that matter, and check the reduced mode by emulating\n  `prefers-reduced-motion`.\n\nFor a second reading, suggest `koi-critique` on the route.\n","use_cases":["Add motion to a route or component to explain a state change","Enhance user feedback with purposeful animations","Implement a focal moment with a custom animation sequence","Ensure accessibility with reduced-motion alternatives"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/MirandaSls\/koi-design\/blob\/d86c88cb439045af1785329fcabfbd645fa3b646\/skills\/design-system\/koi-animate\/SKILL.md","source_commit":"d86c88cb439045af1785329fcabfbd645fa3b646","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:43:56.000000Z","updated_at":"2026-11-29T10:53:15.000000Z","seo_title":"Koi Animate \u2014 Add Purposeful Motion to Components","seo_description":"Apply motion to routes or components where it explains feedback, state changes, or earned moments using Koi Animate. Ensures motion aligns with design principles and user","seo_keywords":["koi-animate","add motion","animation for feedback","purposeful motion","reduced-motion path","state change animation"]}}