← Back to templates

Web motion

Page and modal transitions

Preserve continuity between pages while keeping interactions usable.

Your inputs

Requested output

A reusable component and configuration integrated into the existing repository, required styles or shaders, a runnable demo, a list of changed files, validation results and known limitations.

Original model policy · no model was executed

model-agnostic coding agent

Original usage notes

  • A prompt for a development agent implementing changes in an existing codebase; the requested output is code.

Prompt with your inputs

The default values are filled in. This prompt has not been executed.

Original reusable prompt
Implement an accessible transition pattern for {{target}} using the project's current router and component system. Desired motion: {{effect}}. Keep route state, browser history, deep links and scroll restoration correct. For dialogs, preserve focus trapping, Escape handling, labelled semantics and focus return to the trigger. Make enter and exit transitions interruptible, and handle rapid repeated navigation without stranded overlays or hidden content. Feature-detect optional browser transition APIs and provide a simple fallback. For this UI task, prefer CSS and the Web Animations API or an animation library already installed. Do not introduce Three.js or a new animation dependency unless this specific effect requires it. Animate transform and opacity where possible, avoid layout thrashing, and preserve existing semantic HTML, focus order and interaction behavior.

Implementation constraints:
First inspect the existing repository and installed versions. Reuse its routing, styling, build tools and dependency conventions. Use React Three Fiber only if the project already uses it or the integration is clearly justified; otherwise use the existing Three.js integration or a minimal isolated component. Do not assume version-specific APIs: check the installed package documentation and types. Do not change unrelated pages or silently replace the application architecture. Explain any required new dependency before adding it. Dispose GPU resources, remove event listeners and stop rendering when the component is not visible. Respect prefers-reduced-motion and provide a readable non-WebGL fallback. Keep links and controls in accessible HTML above the canvas. Return the changed files, configuration knobs, tests performed and known limitations.

Acceptance criteria:
- Back and forward navigation, direct URLs and rapid navigation all reach the correct content.
- Keyboard focus lands in a sensible place after route changes and returns after dialog close.
- Reduced-motion mode changes content without spatial animation.
- No invisible overlay blocks clicks after an interrupted transition.
- Test Escape, Tab navigation, touch close controls and repeated open-close cycles.

Requested checks · not performed

  • Back and forward navigation, direct URLs and rapid navigation all reach the correct content.
  • Keyboard focus lands in a sensible place after route changes and returns after dialog close.
  • Reduced-motion mode changes content without spatial animation.
  • No invisible overlay blocks clicks after an interrupted transition.
  • Test Escape, Tab navigation, touch close controls and repeated open-close cycles.

Execution record

Download template record ↓

Source & preservation

Kumyu Academy creative templates