Uses @use-gesture/react to provide 60fps pinch-to-zoom, middle-mouse panning, and trackpad scrolling across an infinite grid space.
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 { InfiniteZoomCanvas } from "@/components/creative/infinite-zoom-canvas";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { InfiniteZoomCanvas } from "@/components/creative/infinite-zoom-canvas";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<InfiniteZoomCanvas
initialScale{10}
minScale{10}
maxScale{10}
>
<div>Content goes here</div>
</InfiniteZoomCanvas>
</div>
);
}