Runaway Button, animated React component
A cancel-subscription dialog whose cancel button slips away from the pointer, getting less sure of itself each time, then gives up after a few tries and lets you click it. Keyboard users get a normal button that never moves while focused.
- Pro
- Inputs & Controls
- Hover
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Cancel your subscription?
You'll lose your saved boards at the end of the month.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| onCancel | () => void | undefined | Called when the cancel button is finally clicked or activated from the keyboard. |
| onKeep | () => void | undefined | Called when "Keep my plan" is clicked. |
| autoplay | boolean | false | Hops the cancel button around the dialog every 1.1 s, until someone points at it, focuses it or presses a key. |