{
 "kind": "tool",
 "slug": "react-three",
 "path": "tools/react-three/",
 "name": "React Three Fiber",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "3D and graphics",
   "tools/3d-graphics/"
  ]
 ],
 "lead": "React renderer for Three.js enabling 3D graphics with component patterns.",
 "chips": [
  {
   "label": "3D and graphics",
   "path": "tools/3d-graphics/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install @react-three/fiber"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/pmndrs/react-three-fiber"
  },
  {
   "label": "Website",
   "href": "https://github.com/pmndrs/react-three-fiber#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/pmndrs/react-three-fiber"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Oct 21, 2026",
   "note": "Latest GitHub release Oct 15, 2026. ",
   "src": "https://github.com/pmndrs/react-three-fiber"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "73 projects",
   "status": "info",
   "sub": "#3 of 63 in its category",
   "note": "Dependency in 73 public GitHub projects set up for AI coding agents that we scanned (1.2%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "yes",
   "sub": "llms.txt",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": "https://r3f.docs.pmnd.rs/llms.txt"
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What React Three Fiber does",
   "parts": [
    {
     "t": "prose",
     "text": "React renderer for Three.js enabling 3D graphics with component patterns."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "React Three Fiber popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "83",
       "of": "/ 100",
       "l": "Gid Score, #54 overall"
      },
      {
       "n": "9.3M",
       "l": "downloads a week, npm"
      },
      {
       "n": "33.9K",
       "l": "GitHub stars"
      },
      {
       "n": "73",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How React Three Fiber is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "React Three Fiber is a dependency in 73 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.5% of the 4,867 JavaScript/TypeScript ones), #3 of 63 in 3d and graphics.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 2,712; those are left out of every share on this page.",
      "The most used alternative in our scan is Pixi.js (9 projects).",
      "Projects that use it most often also use Three.js (97.3%), clsx (80.8%), Tailwind Merge (76.7%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "48 projects, 1.5%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "38 projects, 1.6%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "33 projects, 1.1%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "11 projects, 2.3%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "8 projects, 1.7%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "7 projects, 2.5%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 97.3% of its projects",
       "v": "Three.js",
       "path": "tools/three/"
      },
      {
       "l": "In 80.8% of its projects",
       "v": "clsx",
       "path": "tools/clsx/"
      },
      {
       "l": "In 76.7% of its projects",
       "v": "Tailwind Merge",
       "path": "tools/tailwind-merge/"
      },
      {
       "l": "In 97.3% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 76.7% of its projects",
       "v": "Lucide React",
       "path": "tools/lucide-react/"
      },
      {
       "l": "In 95.9% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 64.4% of its projects",
       "v": "Class Variance Authority",
       "path": "tools/class-variance-authority/"
      },
      {
       "l": "In 60.3% of its projects",
       "v": "Framer Motion",
       "path": "tools/framer-motion/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "React Three Fiber in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "No wrapper ceiling",
       "v": "JSX elements are created from three.js itself, so a feature added in a new three.js release is usable without waiting for an R3F update. The maintainers put it as: \"Everything that works in Threejs will work here without exception.\""
      },
      {
       "l": "Scene pieces as components",
       "v": "A component can hold its own state, react to clicks and hovers (<code>onClick</code>, <code>onPointerOver</code>) and subscribe to the render loop with <code>useFrame</code>, which makes models, controls and effects reusable across pages."
      },
      {
       "l": "A large helper ecosystem",
       "v": "Drei (ready-made helpers), postprocessing effects, Rapier and Cannon physics, WebXR, WebGL UI (uikit) and gltfjsx, which turns a GLTF model into a JSX component. Our scan shows how far this goes: see the ecosystem chart below."
      },
      {
       "l": "Performance, as stated by the maintainers",
       "v": "The docs say there is \"no overhead\" compared with plain three.js because components render outside of React, and offer on-demand rendering (<code>frameloop=\"demand\"</code>) so idle scenes stop drawing frames."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Match the React version",
       "v": "R3F is a React renderer and follows React's major version: v8 pairs with React 18, v9 with React 19."
      },
      {
       "l": "You need both React and three.js",
       "v": "The README asks newcomers to know React hooks and the basics of three.js (scene, camera, mesh, geometry, material) before starting."
      },
      {
       "l": "Animate by mutation, not setState",
       "v": "Fast changes belong in <code>useFrame</code>, mutating a ref and scaling by the frame delta; calling <code>setState</code> every frame or on pointer moves routes each update through React and slows the scene."
      }
     ]
    },
    {
     "t": "h3",
     "text": "A clickable, spinning box"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Jsx",
       "code": "import { Canvas, useFrame } from '@react-three/fiber'\nimport { useRef, useState } from 'react'\n\nfunction Box(props) {\n  const ref = useRef()\n  const [hovered, hover] = useState(false)\n  const [clicked, click] = useState(false)\n  useFrame((state, delta) => (ref.current.rotation.x += delta))\n  return (\n    <mesh {...props} ref={ref} scale={clicked ? 1.5 : 1}\n      onClick={() => click(!clicked)}\n      onPointerOver={() => hover(true)} onPointerOut={() => hover(false)}>\n      <boxGeometry args={[1, 1, 1]} />\n      <meshStandardMaterial color={hovered ? 'hotpink' : 'orange'} />\n    </mesh>\n  )\n}\n\nexport default function App() {\n  return (\n    <Canvas>\n      <ambientLight intensity={Math.PI / 2} />\n      <spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} decay={0} intensity={Math.PI} />\n      <Box position={[-1.2, 0, 0]} />\n      <Box position={[1.2, 0, 0]} />\n    </Canvas>\n  )\n}\n"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about React Three Fiber",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/drcmda",
        "Open Collective: https://opencollective.com/react-three-fiber",
        "9 GitHub sponsors"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "react-three-fiber: React Three Fiber 3D renderer for json-render. Use when working with @json-render/react-three-fiber, building 3D scenes from JSON specs, ren"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "@react-three/drei: Drei (helpers)",
        "@types/three: three.js types",
        "gsap: GSAP",
        "@react-three/postprocessing: Postprocessing",
        "zustand: Zustand",
        "maath: maath"
       ]
      },
      {
       "title": "More in 3D and graphics",
       "path": "tools/3d-graphics/",
       "items": [
        {
         "text": "Three.js",
         "path": "tools/three/"
        },
        {
         "text": "Leaflet",
         "path": "tools/leaflet/"
        },
        {
         "text": "React Leaflet",
         "path": "tools/react-leaflet/"
        },
        {
         "text": "@napi-rs/canvas",
         "path": "tools/napi-rs-canvas/"
        },
        {
         "text": "Mapbox GL",
         "path": "tools/mapbox-gl/"
        },
        {
         "text": "MapLibre GL",
         "path": "tools/maplibre-gl/"
        },
        {
         "text": "Resvg-JS",
         "path": "tools/resvg-resvg-js/"
        },
        {
         "text": "OGL",
         "path": "tools/ogl/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "React Three Fiber",
       "me": true,
       "facts": [
        "MIT",
        "Gid 83",
        "9.3M/wk"
       ]
      },
      {
       "name": "Pixi.js",
       "why": "Fast 2D WebGL renderer for interactive graphics, games and animations.",
       "path": "tools/pixi-js/",
       "facts": [
        "MIT",
        "Gid 65",
        "2M/wk"
       ]
      }
     ],
     "more": "Compare React Three Fiber with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install @react-three/fiber"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## React Three Fiber\n- Keep @react-three/fiber on the major that matches React: v8 for React 18, v9 for React 19.\n- Animate inside useFrame by mutating refs and multiplying by delta; never call setState every frame or on pointer move.\n- Reuse geometries and materials (useMemo or module scope); use instancing for repeated objects; keep draw calls in the hundreds.\n- Hide heavy parts with visible={false} instead of mounting and unmounting them.\n- For mostly static scenes use <Canvas frameloop=\"demand\"> and call invalidate() after changing three.js objects directly.\n- Load models with useLoader / Drei's useGLTF (cached by URL); turn GLTF files into components with gltfjsx.\n- Docs for lookups: https://r3f.docs.pmnd.rs/llms.txt\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm @react-three/fiber"
  ],
  [
   "Category",
   "3D and graphics"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "On GitHub since",
   "February 2019"
  ],
  [
   "Gid Score",
   "83.2"
  ],
  [
   "Rank in category",
   "#3 of 63"
  ],
  [
   "GitHub",
   "pmndrs/react-three-fiber"
  ],
  [
   "Last change",
   "Oct 21, 2026"
  ]
 ],
 "good": [
  "A selection the maintainers list in the README; we have not checked each company's use."
 ],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/pmndrs.png"
}