Kinetic UI
Back to Introduction
Layout

Infinite Draggable Canvas

A massive 2D draggable surface perfect for Figma-style boards, nodes, or gallery layouts.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add draggable-canvas

The DraggableCanvas provides a high-performance, frictionless dragging surface using Framer Motion. It acts as a massive container that users can grab and pan around, complete with elastic edge constraints and physical momentum.

Perfect for creating spatial interfaces, node editors, or sprawling image galleries.

Live Preview

Infinite Draggable Canvas
Design SystemNode 1
User FlowNode 2
ArchitectureNode 3
DatabaseNode 4
API RoutesNode 5

Installation

npx kinetic-ui-cli@latest add draggable-canvas

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { DraggableCanvas } from "@/components/creative/draggable-canvas";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { DraggableCanvas } from "@/components/creative/draggable-canvas";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <DraggableCanvas
        canvasSize{10}
        initialX{10}
        initialY{10}
      >
        <div>Content goes here</div>
      </DraggableCanvas>
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.