# physics-press-reaction

physics-press-reaction synchronizes cursor and element compression in GSAP using shared spring scaling. Controls approach trajectory, simultaneous press down, and bouncy release.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 78316 repo stars
- Author: calesthio
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/hyperframes-animation/rules/physics-press-reaction.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/physics-press-reaction

## What it does

This rule structures a simulated pointer click event within an animated UI scene. Rather than scaling a button in isolation, an SVG cursor approaches the element center and compresses simultaneously with the target. Both items scale down together according to `1 - PRESS_INTENSITY`, then spring back to full size using an overshoot ease.

The template combines an HTML scene container, CSS transform setups, and a timeline powered by GSAP. Four sequential phases drive the interaction: cursor approach, synchronized compression, spring release via `back.out`, and shadow shifts. Alternate patterns accommodate extended hold states, pulsing glows, and chained interactions across multiple buttons.

Timing constraints determine whether the motion feels physical. The compression start point `PRESS_DOWN_AT` must exactly equal the approach start time plus approach duration. Violating this timing causes the cursor to compress mid-air before reaching its target.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/physics-press-reaction.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/physics-press-reaction.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/physics-press-reaction.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/physics-press-reaction.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/physics-press-reaction.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/hyperframes-animation/rules/physics-press-reaction.md

## When to use it
- synchronize cursor and button compression during interaction
- structure GSAP timeline phases for approach, press, and rebound
- animate button shadow changes during compression
- implement hold-press delays with pulsing inner glows

## Example prompts
- Generate a synchronized cursor click animation based on physics-press-reaction.
- Configure a GSAP timeline with a hold phase and pulsing button glow.
- Create a sequential two-button interaction with cursor translation.

## Similar
- [frontend-developer](https://affpapa.org/en/nevibecode/skills/dylantarre-frontend-developer.md) — skill · 633 installs
- [theme-crossfade-morph](https://affpapa.org/en/nevibecode/rules/theme-crossfade-morph.md) — rule · ★ 328 repo stars
- [react-spring-physics](https://affpapa.org/en/nevibecode/skills/react-spring-physics.md) — skill · 2700 installs
- [landing](https://affpapa.org/en/nevibecode/skills/landing.md) — skill · 404 installs
- [svg-animation](https://affpapa.org/en/nevibecode/skills/svg-animation.md) — skill · 4400 installs
- [accessible-animation](https://affpapa.org/en/nevibecode/skills/accessible-animation.md) — skill · 4400 installs

From the same set: [calesthio/openmontage](https://affpapa.org/en/nevibecode/by/calesthio/openmontage.md) — 101 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
