Skip to content
IndexRequest a UIAboutContact

Press Feedback

A tactile press response: the element shrinks and darkens while held.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Build a set of three tappable elements with different sizes (a 44px button, a 120x120 tile, and a full-width list row) that show press feedback. While pressed (use :active plus pointer events for reliability on touch), the element scales to 0.97 (button), 0.96 (tile) and 0.99 (row) over 80ms ease-out and its background darkens by about 12%. On release it returns over 260ms with cubic-bezier(0.34,1.56,0.64,1) for a gentle rebound. If the pointer leaves while pressed, it also returns and no click is registered. Show a small counter that increases on each completed click to prove the action fired. Add -webkit-tap-highlight-color: transparent and touch-action: manipulation. For prefers-reduced-motion use only the darkening.

About this pattern

Definition

A visual response applied while an element is being pressed: it scales down slightly and its surface darkens, then returns on release. It makes the interface feel like a physical object that gives under a finger.

Purpose & UX principles

  • Confirms that a touch registered even before the action completes.
  • The effect must start immediately on press (under 50ms) and should be reversible, so the user can slide off to cancel.
  • Keep the effect small. A scale of 0.96 to 0.98 is felt; 0.9 feels cartoonish except on tiny icon buttons.

Interaction states

  • Rest, pressed (while pointer or finger is down), released (springs back).
  • Cancelled: pointer leaves while pressed, so the element returns without triggering the action.

Motion specification

  • Press in: 80ms ease-out, to scale 0.97.
  • Release: 260ms cubic-bezier(0.34, 1.56, 0.64, 1) for a soft rebound.
  • Reduced motion: darken only, no scale.

Responsive behaviour

  • Apply to anything tappable: buttons, cards, list rows.
  • Larger elements use a smaller scale (a full-width card: 0.99).

Code

HTML
<div class="col">
  <button class="b">Button</button>
  <button class="t">Tile</button>
  <button class="r"><span>List row</span><span>›</span></button>
  <p class="count">Completed taps: <b id="n">0</b></p>
</div>

Related patterns

Ripple Effect

↗
Ripple EffectButtons & Actions

Icon Button

↗
Icon ButtonButtons & Actions

Primary & Secondary Button

↗
Primary & Secondary ButtonButtons & Actions