A React wrapper for the postprocessing library that lets react-three-fiber scenes apply post-processing effects declaratively as JSX components.
pmndrs/drei
A collection of ready-made React helper components and hooks for building 3D scenes with react-three-fiber.
- Stars
- 9,994
- Forks
- 853
- Open issues
- 136
- Last commit
- yesterday
What is it?
drei is a helper library for react-three-fiber, the React renderer for Three.js. It provides prebuilt components and hooks for common 3D tasks, so developers don't have to rewrite camera controls, loaders, shadows, text, or shader materials from scratch.
The library is organized by area. It covers cameras and controls such as CameraControls, ScrollControls and KeyboardControls; gizmos like TransformControls and GizmoHelper; abstractions for Text, Image, Edges and Trail; staging helpers such as Environment, Sky, Stars and ContactShadows; and performance utilities including Instances, Merged and AdaptiveDpr. Loader hooks like useGLTF and useTexture are also included.
The package is published as @react-three/drei. It offers a default web entry that exports Html and Loader, and a separate native entry for React Native that omits those two components. Documentation is hosted on a separate site with live Storybook examples.
Key features
- 01Prebuilt camera controls, gizmos and keyboard/scroll input components
- 02Abstractions for 3D text, images, edges, trails and outlines
- 03Loader hooks such as useGLTF, useTexture and useFBX
- 04Staging helpers for environment maps, sky, shadows and lighting
- 05Performance utilities including instancing, merged geometry and adaptive resolution
- 06Separate web and React Native entry points
Use cases
- Building interactive product viewers with orbit controls and loaded glTF models
- Adding 3D text, HTML overlays or scroll-driven animations to a React site
- Creating scenes with soft shadows, environment lighting and reflective materials
- Rendering large numbers of repeated meshes efficiently in a React Three Fiber app
Quick start
- 1
Install the package from npm
npm install @react-three/drei
Things to know
- The React Native route (@react-three/drei/native) does not export Html or Loader.
- It is built for react-three-fiber, so you must also set up @react-three/fiber.
Topics
FAQ
- What is drei?
- A collection of ready-made React helper components and hooks for building 3D scenes with react-three-fiber. drei is a helper library for react-three-fiber, the React renderer for Three.js. It provides prebuilt components and hooks for common 3D tasks, so developers don't have to rewrite camera controls, loaders, shadows, text, or shader materials from scratch.
- Is drei free to use? What license does it have?
- drei is open source under the MIT license. Check the license terms before using it in commercial products.
- Is drei still maintained?
- Actively maintained. The last commit to drei was on Oct 19, 2026.
- What can I use drei for?
- Building interactive product viewers with orbit controls and loaded glTF models Adding 3D text, HTML overlays or scroll-driven animations to a React site Creating scenes with soft shadows, environment lighting and reflective materials Rendering large numbers of repeated meshes efficiently in a React Three Fiber app
- How do I install drei?
- Install the package from npm: npm install @react-three/drei
- Where can I get drei?
- The source code and installation instructions are on GitHub: https://github.com/pmndrs/drei
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An Agent Skill that lets Codex, Claude Code or Cursor generate an orbitable Three.js architecture scene that assembles itself brick by brick.
An open-source, login-free catalog of interactive Three.js/WebGL UI components with live renderers and full React source.
React bindings for the Rapier WASM physics engine, integrating rigid bodies, colliders and joints into react-three-fiber scenes.
A browser-based 3D boat journey down a Japanese river valley, rendered live with three.js across four seasons and any hour of the day.
Open-source, local-first 3D building editor built on React Three Fiber and WebGPU, usable in the browser or from a CLI with MCP tools for AI agents.