Physics-driven UI for the modern web.
Define forces. Motion emerges.
Website • Demos • Installation • Quick Example • Docs
NovaMotion is a physics engine for UI.
Instead of writing animations for each element, you define forces and fields. The interface responds naturally.
Traditional animation:
animate element → move → stop
NovaMotion:
define environment → motion emerges
npm install novamotionpnpm add novamotionimport { scene } from "novamotion"
scene()
.add(".card", {
spring: true,
enter: { type: "fall" },
stagger: 0.08,
})
.attract(".card", "#cursor", { strength: 350 })
.repel(".pill", "#cursor", { strength: 600, radius: 120 })
.floor()
.start()No timelines. No keyframes. Just physics.
import { Field } from "@novamotion/react"
<Field type="magnet" target="cursor" strength={500} radius={250}>
<Card />
<Card />
<Card />
</Field>One field defines the physics environment. Every child responds automatically.
- Field-based UI physics
- Real-time force simulation
- React integration —
<Field>,<Motion.*>, hooks - CLI project scaffolding — Vanilla, React, Next.js, Astro
- CSS transform rendering — no layout thrashing
- 60fps interaction systems
| Field | Behavior |
|---|---|
MagneticField |
Attraction to cursor or points |
GravityField |
Directional gravitational pull |
RepulsionField |
Push objects away |
VortexField |
Orbital spinning motion |
FlowField |
Organic vector field movement |
WindField |
Directional turbulence |
SpringAnchorField |
Elastic layout systems |
BlackHoleField |
Newtonian r⁻² gravity, event horizon |
ShockwaveField |
Expanding repulsion wavefront |
Run locally:
npm run devOpen http://localhost:3000/demos
npx novamotion init my-appTemplates:
vanilla— HTML + TypeScript + Vitereact— React 18 + Vite +@novamotion/reactnext— Next.js App Router + Field componentsastro— Astro + React islands + NovaMotion
novamotion/
packages/
├─ core engine · RAF loop · entity system · Scene API
├─ physics Vec2 · forces · constraints · PhysicsWorld
├─ react Motion.* · Field · hooks
├─ cli npx novamotion init
└─ devtools canvas debug overlay
demos/
├─ gravity-grid
├─ universe
└─ benchmark
docs/
website/
User interfaces should behave like physical systems, not scripted timelines.
Gravity. Momentum. Inertia. Fields.
The browser becomes a simulation environment for UI.
Created by Rohit Bagewadi
Feedback, experiments, and contributions are welcome.
See CONTRIBUTING.md for development setup, force implementation guidelines, and performance requirements.
MIT License






