Sourcemap Explorer
Stack · npm package

@react-three/drei

useful add-ons for react-three-fiber

latest 10.7.7· MIT· 949 versions publishedView on npm

About

useful add-ons for react-three-fiber

reactthreethreejsreact-three-fiber

What detecting @react-three/drei tells you about a site

@react-three/drei is the helpers-and-abstractions companion to react-three-fiber: cameras, controls, loaders, environment maps and ready-made effects. Its presence confirms not just that the site renders 3D, but that the team is building a polished, feature-rich scene quickly using community-blessed shortcuts rather than wiring every control from scratch. It is a strong tell of a serious 3D experience built by people fluent in the React-three ecosystem, and it implies both fiber and Three.js are also shipping in the bundle.

Why the exact @react-three/drei version matters

drei is versioned in lockstep expectation with react-three-fiber and Three.js, and individual helpers come and go or change props between releases as the upstream Three revisions shift. The exact version therefore pins which helper APIs and which underlying Three features were available, and it is one of the better signals of how recently the 3D work was done.

@react-three/drei in a real-world stack

When you find @react-three/drei in a bundle, it rarely travels alone. @react-three/fiber and three, almost always as a trio.

Quick facts

Latest version10.7.7
LicenseMIT
Installnpm install @react-three/drei
Direct dependencies21
Peer dependenciesreact, three, react-dom, @react-three/fiber

Common pairings

Packages this one expects to find in the same project. Each is also a Sourcemap Explorer detection target.

What @react-three/drei pulls in

@react-three/drei declares 21 direct dependencies — each one also rides into any bundle that ships @react-three/drei, so they are detection targets too. Reading them is a quick way to understand the package's real footprint .

maathhls.jszustandmeshlinestats-glstats.jscross-envdetect-gpuglsl-noisetunnel-ratthree-stdlibsuspend-reactutility-types@babel/runtimethree-mesh-bvhcamera-controlstroika-three-text@use-gesture/react@monogrid/gainmap-js@mediapipe/tasks-visionuse-sync-external-store

How Sourcemap Explorer detects @react-three/drei

@react-three/drei ships as v10.7.7, published 2025-11-13 and carries 21 direct dependencies, 4 peer dependencies (react, three, react-dom), 949 versions on the registry. Those exact numbers are the footprint Sourcemap Explorer matches when @react-three/drei rides inside a deployed bundle — here is how the detection works.

We catch @react-three/drei from two complementary signals: bundled source paths and the embedded package.json. Modern bundlers (webpack, Vite, esbuild, Rollup, Turbopack) preserve the original node_modules/@react-three/drei/ paths inside the JavaScript sourcemap's sources[] array — that's the canonical signal. When the matching package.json is also captured in sourcesContent[], we read the exact version field — patch number included. No regex guessing, no version inference.

  1. 1

    Confirm the site exposes sourcemaps

    In DevTools Network, check the response headers of any application script for `SourceMap` or `X-SourceMap`. Failing that, fetch the script's last 4 KB and look for a `//# sourceMappingURL=` comment — that map is where the `@react-three/drei` paths live.

  2. 2

    Find the package in the bundle

    Open DevTools → Network → reload. Click any application script and look at its sourcemap. Inside, search `sources[]` for entries matching `node_modules/@react-three/drei/` — every match confirms the package is bundled. The matching `sourcesContent[i]` for `node_modules/@react-three/drei/package.json` gives you the exact installed version.

  3. 3

    Read the version directly from package.json

    Run `jq -r '. as $m | $m.sources | to_entries[] | select(.value | endswith("node_modules/@react-three/drei/package.json")) | $m.sourcesContent[.key] | fromjson | .version' bundle.js.map`. Sourcemap Explorer automates the same query in the popup.

Major releases of @react-three/drei

When each major version first landed. Major bumps are where breaking changes live, so this timeline is the fastest way to date the @react-three/drei version a site actually ships against the ecosystem.

Major
First release
Date
v10
10.0.0
2025-02-19
v9
9.0.0
2022-03-30
v8
8.0.0
2021-12-11
v7
7.0.0
2021-06-23
v6
6.0.0
2021-06-06
v5
5.0.0
2021-05-17

Recent versions

Version
Released
10.7.7
2025-11-13
10.7.6
2025-09-11
10.7.5
2025-09-08
10.7.4
2025-08-23
10.7.3
2025-08-17
10.7.2
2025-08-16
10.7.1
2025-08-16
10.7.0
2025-08-16

@react-three/drei README

Live mirror of the GitHub README, for reference. Updated whenever the repo's default branch changes.

Storybook Version Downloads Discord Shield Open in GitHub Codespaces

logo

A growing collection of useful helpers and fully functional, ready-made abstractions for @react-three/fiber.

If you make a component that is generic enough to be useful to others, think about CONTRIBUTING!

npm install @react-three/drei

[!IMPORTANT] this package is using the stand-alone three-stdlib instead of three/examples/jsm.

Basic usage

import { PerspectiveCamera, PositionalAudio, ... } from '@react-three/drei'

React-native

import { PerspectiveCamera, PositionalAudio, ... } from '@react-three/drei/native'

The native route of the library does not export Html or Loader. The default export of the library is web which does export Html and Loader.

Documentation

https://pmndrs.github.io/drei

Old doc

[!WARNING] Below is an archive of the anchors links with their new respective locations to the documentation website. Do not update the links below, they are for reference only.

Cameras

PerspectiveCamera

Documentation has moved here

OrthographicCamera

Documentation has moved here

CubeCamera

Documentation has moved here

Controls

CameraControls

Documentation has moved here

ScrollControls

Documentation has moved here

PresentationControls

Documentation has moved here

KeyboardControls

Documentation has moved here

FaceControls

Documentation has moved here

MotionPathControls

Documentation has moved here

Gizmos

GizmoHelper

Documentation has moved here

PivotControls

Documentation has moved here

DragControls

Documentation has moved here

TransformControls

Documentation has moved here

Grid

Documentation has moved here

Helper / useHelper

Documentation has moved here

Shapes

Plane, Box, Sphere, Circle, Cone, Cylinder, Tube, Torus, TorusKnot, Ring, Tetrahedron, Polyhedron, Icosahedron, Octahedron, Dodecahedron, Extrude, Lathe, Shape

Documentation has moved here

RoundedBox

Documentation has moved here

ScreenQuad

Documentation has moved here

Line

Documentation has moved here

QuadraticBezierLine

Documentation has moved here

CubicBezierLine

Documentation has moved here

CatmullRomLine

Documentation has moved here

Facemesh

Documentation has moved here

Abstractions

Image

Documentation has moved here

Text

Documentation has moved here

Text3D

Documentation has moved here

Effects

Documentation has moved here

PositionalAudio

Documentation has moved here

Billboard

Documentation has moved here

ScreenSpace

Documentation has moved here

ScreenSizer

Documentation has moved here

GradientTexture

Documentation has moved here

Edges

Documentation has moved here

Outlines

Documentation has moved here

Trail

Documentation has moved here

Sampler

Documentation has moved here

ComputedAttribute

Documentation has moved here

Clone

Documentation has moved here

useAnimations

Documentation has moved here

MarchingCubes

Documentation has moved here

Decal

Documentation has moved here

Svg

Documentation has moved here

AsciiRenderer

Documentation has moved here

Splat

Documentation has moved here

Shaders

MeshReflectorMaterial

Documentation has moved here

MeshWobbleMaterial

Documentation has moved here

MeshDistortMaterial

Documentation has moved here

MeshRefractionMaterial

Documentation has moved here

MeshTransmissionMaterial

Documentation has moved here

MeshDiscardMaterial

Documentation has moved here

PointMaterial

Documentation has moved here

SoftShadows

Documentation has moved here

shaderMaterial

Documentation has moved here

Modifiers

CurveModifier

Documentation has moved here

Misc

useContextBridge

Documentation has moved here

Example

Documentation has moved here

Html

Documentation has moved here

CycleRaycast

Documentation has moved here

Select

Documentation has moved here

Sprite Animator

Documentation has moved here

Stats

Documentation has moved here

StatsGl

Documentation has moved here

Wireframe

Documentation has moved here

useDepthBuffer

Documentation has moved here

Fbo / useFBO

Documentation has moved here

useCamera

Documentation has moved here

CubeCamera / useCubeCamera

Documentation has moved here

DetectGPU / useDetectGPU

Documentation has moved here

useAspect

Documentation has moved here

useCursor

Documentation has moved here

useIntersect

Documentation has moved here

useBoxProjectedEnv

Documentation has moved here

Trail / useTrail

Documentation has moved here

useSurfaceSampler

Documentation has moved here

FaceLandmarker

Documentation has moved here

Loading

Loader

Documentation has moved here

Progress / useProgress

Documentation has moved here

Gltf / useGLTF

Documentation has moved here

Fbx / useFBX

Documentation has moved here

Texture / useTexture

Documentation has moved here

Ktx2 / useKTX2

Documentation has moved here

CubeTexture / useCubeTexture

Documentation has moved here

VideoTexture / useVideoTexture

Documentation has moved here

TrailTexture / useTrailTexture

Documentation has moved here

useFont

Documentation has moved here

useSpriteLoader

Documentation has moved here

Performance

Instances

Documentation has moved here

Merged

Documentation has moved here

Points

Documentation has moved here

Segments

Documentation has moved here

Detailed

Documentation has moved here

Preload

Documentation has moved here

BakeShadows

Documentation has moved here

meshBounds

Documentation has moved here

AdaptiveDpr

Documentation has moved here

AdaptiveEvents

Documentation has moved here

Bvh

Documentation has moved here

PerformanceMonitor

Documentation has moved here

Portals

Hud

Documentation has moved here

View

Documentation has moved here

RenderTexture

Documentation has moved here

RenderCubeTexture

Documentation has moved here

Fisheye

Documentation has moved here

Mask

Documentation has moved here

MeshPortalMaterial

Documentation has moved here

Staging

Center

Documentation has moved here

Resize

Documentation has moved here

BBAnchor

Documentation has moved here

Bounds

Documentation has moved here

CameraShake

Documentation has moved here

Float

Documentation has moved here

Stage

Documentation has moved here

Backdrop

Documentation has moved here

Shadow

Documentation has moved here

Caustics

Documentation has moved here

ContactShadows

Documentation has moved here

RandomizedLight

Documentation has moved here

AccumulativeShadows

Documentation has moved here

SpotLight

Documentation has moved here

SpotLightShadow

Documentation has moved here

Environment

Documentation has moved here

Lightformer

Documentation has moved here

Sky

Documentation has moved here

Stars

Documentation has moved here

Sparkles

Documentation has moved here

Cloud

Documentation has moved here

useEnvironment

Documentation has moved here

MatcapTexture / useMatcapTexture

Documentation has moved here

NormalTexture / useNormalTexture

Documentation has moved here

ShadowAlpha

Documentation has moved here

Dev

INSTALL

Pre-requisites:

  • Install nvm, then:
    $ nvm install
    $ nvm use
    $ node -v # make sure your version satisfies package.json#engines.node
    
    nb: if you want this node version to be your default nvm's one: nvm alias default node
  • Install yarn, with:
    $ corepack enable
    $ corepack prepare --activate # it reads "packageManager"
    $ yarn -v # make sure your version satisfies package.json#engines.yarn
    
$ yarn install

Test

Local

Pre-requisites:

  • $ npx playwright install
    

To run visual tests locally:

$ yarn build
$ yarn test

To update a snapshot:

$ PLAYWRIGHT_UPDATE_SNAPSHOTS=1 yarn test
Docker

[!IMPORTANT] Snapshots are system-dependent, so to run playwright in the same environment as the CI:

$ docker run --init --rm \
    -v $(pwd):/app -w /app \
    ghcr.io/pmndrs/playwright:drei \
      sh -c "corepack enable && yarn install && yarn build && yarn test"

To update a snapshot:

$ docker run --init --rm \
    -v $(pwd):/app -w /app \
    -e PLAYWRIGHT_UPDATE_SNAPSHOTS=1 \
    ghcr.io/pmndrs/playwright:drei \
      sh -c "corepack enable && yarn install && yarn build && yarn test"

FAQ

What is @react-three/drei used for?

useful add-ons for react-three-fiber

How can I tell if a website is using @react-three/drei?

Open the page in Chrome with the Sourcemap Explorer extension installed and read the Stack tab. We catch `@react-three/drei` from two complementary signals: `node_modules/@react-three/drei/` paths inside the JavaScript sourcemap, and the embedded `package.json` we read for exact-version detection. Without the extension you can do the same lookup manually in DevTools — the steps are listed in the "How Sourcemap Explorer detects" section above.

How do I find out which version of @react-three/drei a website is running?

Read it straight from the site's JavaScript sourcemap. When a build ships source maps, the bundled `@react-three/drei/package.json` carries the exact `version` string — Sourcemap Explorer extracts it in one click on the Stack tab, and you can do it by hand in DevTools by opening the `.map` file and searching for `node_modules/@react-three/drei/package.json`. That is far more reliable than inferring the version from an asset-hash or a `?ver=` query string, which is all surface-level detectors have to go on. The current npm release is 10.7.7, but real deployments frequently run an older pinned version — which is exactly why reading the bundled number matters.

What is the latest version of @react-three/drei?

10.7.7, as published on the npm registry. The "Recent versions" table on this page lists the most recent 8 releases with their release dates. Sourcemap Explorer reports the version actually bundled into a site, which can lag the latest release by months on real-world deployments.

Is @react-three/drei actively maintained?

Actively maintained — the package is shipping new releases at a steady cadence. The last published release was 2025-11-13. Source code: https://github.com/pmndrs/drei.

Where can I read more?

Project homepage: https://github.com/pmndrs/drei. Source code: https://github.com/pmndrs/drei. Published on npm: https://www.npmjs.com/package/@react-three/drei. Licensed as MIT.

Keep reading on Sourcemap Explorer

Detected by Sourcemap Explorer

When a bundle ships sourcemaps, we read the embedded package.json for @react-three/drei and report the precise version (the registry's latest is v10.7.7, published 2025-11-13; the bundled copy is often older). Without sourcemaps, an import / require in the page's scripts is enough to flag it.

Install free on Chrome