Hover & click any component or section to see its motionwind code — the code panel slides in from the right
Write Motion animations as Tailwind-like utility classes. Transformed at build time. Zero runtime overhead. No imports needed.
// Just add classes. That's it.
<button
className="
animate-hover:scale-110
animate-tap:scale-95
animate-spring
rounded-xl bg-white px-6 py-3
"
>
Click me
</button>Every preview below is powered by motionwind classes. Interact to feel them live.
animate-focus:scale-105·animate-focus:y--2·animate-spring·animate-stiffness-300animate-hover:scale-110·animate-tap:scale-90·animate-spring| Gesture | Prefix | Use Case |
|---|---|---|
| Hover | animate-hover: | Buttons, cards, links, any pointer interaction |
| Tap | animate-tap: | Button press feedback, click effects |
| Focus | animate-focus: | Form inputs, accessibility focus indicators |
| Drag | animate-drag: | Draggable elements, sliders, sortable items |
| InView | animate-inview: | Scroll-triggered reveals, lazy animations |
| Initial | animate-initial: | Starting state for enter/inview animations |
| Enter | animate-enter: | Target state on mount |
| Exit | animate-exit: | Target state on unmount (requires AnimatePresence) |
animate-initial:opacity-0·animate-initial:y-20·animate-inview:opacity-100·animate-inview:y-0·animate-onceanimate-drag-both·animate-drag-elastic-30·animate-drag-snapanimate-enter:rotate-360·animate-repeat-infinite·animate-ease-linearanimate-spring·animate-stiffness-200·animate-damping-8·animate-hover:scale-115A Babel plugin reads your classes and emits optimized Motion components. Your users never pay for parsing.
// No imports needed
<div
className="
animate-initial:opacity-0
animate-initial:y-20
animate-inview:opacity-100
animate-inview:y-0
animate-duration-500
animate-once
p-4 rounded-lg
"
>
Hello world
</div>// Auto-injected by Babel
import { motion } from "motion/react"
<motion.div
className="p-4 rounded-lg"
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
viewport={{ once: true }}
>
Hello world
</motion.div>Add motionwind classes to any element or component. No imports, no wrappers.
animate-hover:scale-110At build time, classes are parsed and converted to Motion component props.
whileHover={{ scale: 1.1 }}Production bundle contains only optimized Motion components. No parser shipped.
0kb runtime addedClick to see code
Static classes compiled away at build time. No parser, no overhead in production.
If you know Tailwind, you already know motionwind. Same utility-first approach.
Hover, tap, focus, in-view, drag, initial, enter, and exit gestures.
First-class integrations for Next.js and Vite. One line to configure.
Stiffness, damping, mass, and bounce — all controllable through classes.
Enable dragging on any axis with elastic constraints.
Works on <Card>, <Button>, any component. No mw.* wrappers needed.
Static animate classes extracted from template literals at build time.
Click to see examples
animate-{gesture}:{property}-{value}hover:whileHover
tap:whileTap
focus:whileFocus
inview:whileInView
drag:whileDrag
initial:initial
enter:animate
exit:exit
One command to install. One line to configure. Start animating immediately.
import withMotionwind from "motionwind/next"
export default withMotionwind(config)import motionwind from "motionwind/vite"
plugins: [motionwind(), react()]// Spring-powered button
<button
className="
animate-hover:scale-110
animate-tap:scale-95
animate-spring
rounded-xl bg-white px-6 py-3
"
>
Click me
</button>