04.04 · Micro-Interactions
Button Press Scale
Shrinks as you press it and springs back as you let go. Best for main buttons.
Click it
Press and hold a button, then let go, or press Show me.
Inside, the outer outline is the button at rest and the inner one its size while held down; let go and it springs back out. Press and hold a button, or press Show me.
Stays the same: pressing it changes nothing, so it feels dead; Shrinks when pressed: it sinks in while held and springs back as you let go. Press a button, or Show me.
Try it
Change a setting, then try it again or press Show me.
Press depth
How much the button shrinks while held down.
Release speed
How long it takes to spring back.
Release feel
Springy goes a little past full size, then settles.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add press feedback to [the buttons you want to feel tactile]. While a button is held down it shrinks, as if pushed in, and when it is let go it returns to full size. A press that is quicker than the release feels most like a real button. Respond to mouse, touch and pen presses and to Space and Enter on the keyboard, and let go cleanly if a press turns into a scroll, so no button stays stuck down. Change only the button's size so nothing around it moves. If the visitor has reduced motion turned on, change the size at once, without animating it. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.