StealThis .dev
Патерни Легка

Button Press Effect

Scale and shadow on press with optional success checkmark — satisfying click feedback for buttons and controls.

Відкрити в Lab
css vanilla-js
Цілі: JS HTML

Код

Button Press Effect

Reusable press feedback: scale down and shadow on active, with optional success checkmark. Reference patterns from like-button and copy-to-clipboard.

Features

  • CSS transform: scale() and box-shadow on :active
  • Optional brief success state (checkmark) via class toggle
  • No dependencies