press-release-spring — Claude Code rule: what it does, how to install
press-release-spring calculates tactile button animation with linear scaling on tap, GSAP spring bounce on release, and glowing visual cues. Useful when polishing UI interactions.
AGPL-3.0 ★ 78,316 updated 2026-10-24
.claude/rules/press-release-spring.mdWhat press-release-spring does
This rule formats button press motion using GSAP timelines. The interaction splits into two steps. First comes a direct linear compression where the button scales down and drops its shadow. Second comes a spring bounce powered by back.out, creating a slight overshoot before stabilizing.
Visual layers accompany the movement. A burst ring expands behind the button while ambient glow tints the background. To keep the action visible on 1080p displays, button dimensions must occupy at least 3% to 5% of the total canvas space.
Tweens will snap abruptly if the start scale of the release does not match the end scale of the press. Running this code requires loading GSAP. The file includes configurations for subtle clicks, heavy hero actions, and checkmark transitions.
What it helps with
- animate tactile button presses with GSAP bounce dynamics
- sync shadow reduction with an expanding burst layer
- scale button dimensions properly for 1080p canvas displays
- build confirm button states that switch colors on release
Example prompts for the agent
- Generate a tactile button animation with press-release-spring physics
- Create a dramatic hero button press using back.out bounce and burst glow
- Set up a confirmation button that turns green and shows a checkmark on release
How to install press-release-spring
Manually: put the files in place
.claude/rules/press-release-spring.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/press-release-spring.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/press-release-spring.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/press-release-spring.mdManually: put the files in place
.clinerules/press-release-spring.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about press-release-spring
How do I install press-release-spring in Claude Code?
Save the rule file to .claude/rules/press-release-spring.md in your project root.
What does press-release-spring do?
It supplies HTML, CSS, and GSAP timeline blueprints for a two-phase button press with spring recovery and glow effects.
What external libraries are needed for this animation?
The timeline relies on GSAP version 3.14.2 or higher loaded via script tag or bundler.