Pressed Button Feedback
Give every interactive control an immediate, physical-feeling response to a press.
Paste this into your agent.
A button that doesn't visibly react to a click reads as broken, even if the action fires correctly. The interface needs to acknowledge the press before the async result comes back.
When to use
- Any clickable/tappable control: buttons, icon buttons, cards acting as links, toggle switches.
- Especially important on touch devices, where there's no hover state to rely on.
Principles
- Feedback has three phases: press (instant, <16ms), hold (while pointer is down), release (returns to rest or transitions to a loading/success state).
- The press state should be visually distinct but subtle — a scale or brightness change, not a layout shift.
- Feedback must never wait on the network. Show the pressed state immediately; handle the async result separately (loading spinner, disabled state, error).
Instructions
- Add a
:active(oronPointerDown) state that triggers within one frame — no transition delay on press-in. - Use
scale(0.97)or a slight opacity/brightness dip, not a color change that could be mistaken for a disabled state. - Transition back out over 100–150ms on release so it doesn't feel sluggish.
- If the action is async, disable the button and show a loading indicator only after the pressed feedback has played — don't skip straight to a spinner.
- Respect
prefers-reduced-motion: fall back to an opacity-only change instead of a scale transform.
Examples
cssbutton {
transition: transform 120ms ease-out, opacity 120ms ease-out;
}
button:active {
transform: scale(0.97);
transition-duration: 0ms;
}
Avoid
- Don't rely on the browser's default focus ring as your only feedback — it doesn't fire on click in most browsers.
- Don't animate width/height/padding for press feedback; it causes layout shift and feels laggy.
- Don't skip feedback on "instant" actions just because they resolve fast — sub-100ms actions still benefit from a press state.
References
- Native iOS/Android touch feedback (
UIButtonhighlight, Material ripple) as the baseline expectation users already have.
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
12 Principles of Animationby raphaelsalaja
Apply Disney's 12 animation principles to web interfaces to make motion feel natural, organic, and human.
MotionExternalGitHub stars: 42
Animateby emilkowalski
Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.
MotionExternalGitHub stars: 51.4K
Animateby pbakaus
Enhance UX with purposeful animation and micro-interactions that support usability and delight.
MotionExternalGitHub stars: 95.1K
Animate Expoby emilkowalski
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.
MotionExternalGitHub stars: 51.4K