Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

React Three Fiber

React renderer for Three.js enabling 3D graphics with component patterns.

3D and graphicsNPM

GitHubWebsite

1. License

License from npm.

github.com/pmndrs/react-three-fiber

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What React Three Fiber does

React renderer for Three.js enabling 3D graphics with component patterns.

React Three Fiber popularity

83 / 100
Gid Score, #54 overall
9.3M
downloads a week, npm
33.9K
GitHub stars
73
agent projects use it
React Three Fiber: downloads per weeknpm, @react-three/fiber 9,292,494
React Three Fiber: GitHub starspmndrs/react-three-fiber 33,905

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How React Three Fiber is used

  • 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%).

By coding agent

48 projects, 1.5%
38 projects, 1.6%
33 projects, 1.1%
11 projects, 2.3%
8 projects, 1.7%
7 projects, 2.5%

Often used with

In 97.3% of its projects
In 80.8% of its projects
In 76.7% of its projects
In 97.3% of its projects
In 76.7% of its projects
In 95.9% of its projects
In 64.4% of its projects
In 60.3% of its projects

React Three Fiber in practice

Strengths

No wrapper ceiling

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."

Scene pieces as components

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.

A large helper ecosystem

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.

Performance, as stated by the maintainers

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.

Watch out for

Match the React version

R3F is a React renderer and follows React's major version: v8 pairs with React 18, v9 with React 19.

You need both React and three.js

The README asks newcomers to know React hooks and the basics of three.js (scene, camera, mesh, geometry, material) before starting.

Animate by mutation, not setState

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.

A clickable, spinning box

import { Canvas, useFrame } from '@react-three/fiber'
import { useRef, useState } from 'react'

function Box(props) {
  const ref = useRef()
  const [hovered, hover] = useState(false)
  const [clicked, click] = useState(false)
  useFrame((state, delta) => (ref.current.rotation.x += delta))
  return (
    <mesh {...props} ref={ref} scale={clicked ? 1.5 : 1}
      onClick={() => click(!clicked)}
      onPointerOver={() => hover(true)} onPointerOut={() => hover(false)}>
      <boxGeometry args={[1, 1, 1]} />
      <meshStandardMaterial color={hovered ? 'hotpink' : 'orange'} />
    </mesh>
  )
}

export default function App() {
  return (
    <Canvas>
      <ambientLight intensity={Math.PI / 2} />
      <spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} decay={0} intensity={Math.PI} />
      <Box position={[-1.2, 0, 0]} />
      <Box position={[1.2, 0, 0]} />
    </Canvas>
  )
}

More about React Three Fiber

Funding
  • GitHub Sponsors: https://github.com/drcmda
  • Open Collective: https://opencollective.com/react-three-fiber
  • 9 GitHub sponsors

See all

Agent Skills for it
  • 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

See all

Packages around it
  • @react-three/drei: Drei (helpers)
  • @types/three: three.js types
  • gsap: GSAP
  • @react-three/postprocessing: Postprocessing
  • zustand: Zustand
  • maath: maath
More in 3D and graphics

Alternatives

React Three Fiber This page

MITGid 839.3M/wk

Pixi.js

Fast 2D WebGL renderer for interactive graphics, games and animations.

MITGid 652M/wk

Compare React Three Fiber with another tool

Get started

Install it.

npm install @react-three/fiber

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## React Three Fiber
- Keep @react-three/fiber on the major that matches React: v8 for React 18, v9 for React 19.
- Animate inside useFrame by mutating refs and multiplying by delta; never call setState every frame or on pointer move.
- Reuse geometries and materials (useMemo or module scope); use instancing for repeated objects; keep draw calls in the hundreds.
- Hide heavy parts with visible={false} instead of mounting and unmounting them.
- For mostly static scenes use <Canvas frameloop="demand"> and call invalidate() after changing three.js objects directly.
- Load models with useLoader / Drei's useGLTF (cached by URL); turn GLTF files into components with gltfjsx.
- Docs for lookups: https://r3f.docs.pmnd.rs/llms.txt

AgentGid articles about React Three Fiber

All guides