Hold to Confirm
Hold to fill the progress; release and it retracts; it only acts when full, good for dangerous actions
This effect uses fixed demo content, so custom text isn’t applied.
Hannah's Motion Library
Web motion effects × AI prompts
AI prompt
A button for dangerous actions such as delete, with an outlined style: while the user holds it, a fill sweeps from left to right at a steady pace over about 1.2 s until the button is full, and the button shrinks slightly; releasing midway quickly retracts the fill and nothing happens; when full, the button gives a small pop and the text changes to “Deleted ✓”. Prevents accidental taps. (CSS: the fill layer transform:scaleX(0), a class while holding switches it to scaleX(1) with transition 1.2s linear, removing the class on release retracts it with a shorter transition; JS starts a 1.2 s timer on pointerdown and cancels it on pointerup / pointerleave)
When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.
How to use it
- Tap “Copy AI prompt”.
- Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
- The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.
More button effects
346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts
Browse all effects →