A playful physics sandbox using Matter.js to drop rigid bodies onto the screen.
Live Preview
Installation
npx kinetic-ui-cli@latest add Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { FallingElements } from "@/components/creative/falling-elements";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { FallingElements } from "@/components/creative/falling-elements";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<FallingElements
density{10}
restitution{10}
friction{10}
>
<div>Content goes here</div>
</FallingElements>
</div>
);
}