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