“Save changes” keeps its width while loading.
Five variants, three sizes, a press that gives, and a loading state that keeps the width.
Interaction experiments with React and Motion. Every piece respects reduced motion, works with the keyboard, and is copy-paste ready.
“Save changes” keeps its width while loading.
Five variants, three sizes, a press that gives, and a loading state that keeps the width.
label is required by the type, so an unlabeled icon button doesn't compile.
Square button for a single icon. Its accessible name is required by the type, so it can't ship unlabeled.
Opens from its trigger. Try ↑ ↓, typing a letter, Esc.
Menu that grows out of its trigger, even after flipping, with a quick item cascade, typeahead and full keyboard support.
The new theme grows from where you click. With reduced motion, it just switches. Uses next-themes with attribute="class", the shadcn/ui default.
Light/dark switch where the new theme grows in a circle from the click, with a sun/moon morph.
Toasts appear bottom-right. Hover to expand · swipe right or press Esc to dismiss.
Stacked toasts that fan out on hover, swipe to dismiss, pause while you read, and morph from loading to done.
Springy, draggable thumb that stretches while pressed. Async (optimistic or pessimistic) with shake-on-error, icons, custom color and native form support.
The spring keeps its velocity when interrupted; the CSS transition restarts from a standstill each time.
The same switch with zero JS animation. Mash it next to the Motion version to feel spring vs bezier.
Icon morphs from copy to check with a blur-scale crossfade, then the check draws itself.
Segmented tabs with a pill that slides between items using a shared layout animation.