Swap labels without changing the button width.
- Trigger
- Hover, focus, tap
- Duration
- 220ms / 160ms out
- Easing
- ease-out-quint
A collection of UI microinteractions with live demos, timing notes, and copyable HTML, CSS, JavaScript, and Tailwind code. React components install with shadcn. The site is open source on GitHub.
Skill for coding agents
npx skills@latest add https://microinteractions.dev Swap labels without changing the button width.
Hold the button for 1,200ms to confirm. Release early to cancel.
Pour the selection from one option to the next.
Open the menu with the current option on top of the trigger.
Keep a slider's value label inside its container.
Yes, under MIT. Copy the CSS or Tailwind version, or install the React port. Credit is welcome, not required.
No. Each study is HTML, CSS, and a short script.
With the shadcn CLI, or by copying the code under the demo. The React port wraps the same script, so both behave the same.
Every study respects it. The movement drops out, and the change still reads without it: here the panel lands on the question at once, and the answer fades in.
From the demo itself. Each page lists the duration and curve it runs.
Slide one panel to the question you open and fit it to the answer.
Planned studies
0 of 10
| Study | Category | |
|---|---|---|
| Copy to clipboard | Actions | |
| Tab indicator | Navigation | |
| Switch | Toggles & choices | |
| Segmented control | Toggles & choices | |
| Number scrub | Values | |
| One-time code | Input | |
| Popover | Disclosure | |
| Toast | Feedback | |
| Undo | Feedback | |
| Drag to reorder | Direct manipulation |
Check a run of table rows in one drag down the boxes.
Studies
Drag to select
Check a run of table rows in one drag down the boxes.
Show the grip where the pointer meets the divider.
Press Space to pick up, the arrow keys to move, Space to drop, Escape to cancel.
Open a gap in a list that follows the item you drag.