# React Three Fiber examples — card for AI agents

Gallery of React Three Fiber scenes (shaders, portals, caustics, scroll, physics, glass) linked to runnable sandboxes with source.

Category: Web animation examples and effects (also: Video references and motion backgrounds, 3D models) · maker Poimandres (pmndrs) · checked 2026-11-05 · style: 3d, abstract, dark

## Price
- Price: Free
- Free tier: Fully free.

## License
MIT — https://raw.githubusercontent.com/pmndrs/react-three-fiber/master/LICENSE

- commercial: **yes** (Commercial use OK)
  > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  (https://raw.githubusercontent.com/pmndrs/react-three-fiber/master/LICENSE)
- attribution: **no** (No credit needed)
  > The above copyright notice and this permission notice shall be included in all
  (https://raw.githubusercontent.com/pmndrs/react-three-fiber/master/LICENSE)
- in app: **yes** (Can ship inside your app)
  > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  (https://raw.githubusercontent.com/pmndrs/react-three-fiber/master/LICENSE)
- redistribute: **yes** (Can pass the files on to your own users)
  > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  (https://raw.githubusercontent.com/pmndrs/react-three-fiber/master/LICENSE)

## Rules to follow
- Library code is MIT; each linked sandbox/demo may have its own license and assets: check before copying.

## Can an AI agent use it by itself?
**Yes** · copy-code: Agent copies the code, snippet or prompt from the page (no account)

## How an agent gets files
- Open an example from the docs page and copy its code from the linked sandbox; npm install @react-three/fiber three. (sign-in: none)
- Formats: jsx, tsx, js, glb
- Not allowed: Sandbox assets may have their own licenses

## How to connect
- Package (npm/PyPI)
- npm: `npm install @react-three/fiber`
- Repository: https://github.com/pmndrs/react-three-fiber
- Website: https://r3f.docs.pmnd.rs/getting-started/examples

## Notes
MIT is confirmed for the library repo, not for every community example.

## Numbers (AgentGid data)
- Gid Score: 69
- GitHub stars: 33,782
- Downloads last week: 9,238,944
- Used in 74 public projects set up for AI coding agents

## Lines to paste into your prompt or AGENTS.md

```
- React Three Fiber examples (Web animation examples and effects, Video references and motion backgrounds, 3D models). Gallery of React Three Fiber scenes (shaders, portals, caustics, scroll, physics, glass) linked to runnable sandboxes with source. Price: free; commercial use OK; no credit needed. Style: 3d, abstract, dark.
  Connect: npm @react-three/fiber.
  Get files: Open an example from the docs page and copy its code from the linked sandbox; npm install @react-three/fiber three (jsx, tsx, js, glb).
  Not allowed: Sandbox assets may have their own licenses
  Rule: Library code is MIT; each linked sandbox/demo may have its own license and assets: check before copying.
  License: https://raw.githubusercontent.com/pmndrs/react-three-fiber/master/LICENSE (checked 2026-11-05; details: https://agentgid.com/assets/react-three-fiber-examples/)
```

## Links
- AgentGid page: https://agentgid.com/assets/react-three-fiber-examples/
- Is it free for commercial use? https://agentgid.com/assets/react-three-fiber-examples/commercial-use/
- Source: https://r3f.docs.pmnd.rs/getting-started/examples
- Source: https://raw.githubusercontent.com/pmndrs/react-three-fiber/master/LICENSE
- Source: https://registry.npmjs.org/@react-three/fiber/latest


## React Three Fiber examples: 3D scenes for React sites

This is a gallery of example 3D scenes made with React Three Fiber, a free code library that lets a React site show interactive 3D. Each example opens as a live online sandbox with its full code, so you or your AI assistant can copy one and change it. The library is free for paid projects, but check each example's own models and pictures before reuse.

### Where to use it
- A 3D top section on a landing page: Put moving 3D shapes or a product next to your headline instead of a flat picture. The scene is built from small reusable pieces.
- Objects that react to the pointer: Make a 3D object grow when clicked and change color when the pointer is over it, for playful buttons or product pickers.
- A 3D model of your product: Show a model from a 3D design app, such as a shoe or a gadget, that visitors can look at on your page.
- 3D inside a phone app: Use the same scene code in a React Native app for iPhone and Android.
- A product color picker: Let shoppers turn a 3D product around and switch its colors or parts before they buy. (idea, not from the official pages)
- A story that moves as you scroll: Move the camera or objects as the visitor scrolls, for a product launch or a portfolio page. (idea, not from the official pages)

### How to start
- Add three.js and React Three Fiber to a React project (for example one made with Vite).

```
npm install three @types/three @react-three/fiber
```

- Make sure the React version matches the library version before you copy an example.
- Open an example on the examples page, copy its code from the sandbox and replace its models and pictures with your own or with free ones.

### License
The library is MIT licensed: free in personal and paid projects, and you keep its short license notice with copies. Models, pictures and code in each online example may come from other people, so check them before reuse.

### Good to know
- The makers say you need to know both React and three.js before starting, so expect a learning curve.
- Version 9 works with React 19 and version 8 with React 18. A mismatch breaks the app.
- Version 10 is being tested with support for newer graphics in browsers, so pin version 9 for now.
- Phone simulators on a Mac often crash with 3D; test phone apps on a real iPhone or iPad.

Checked 2026-11-09 against: https://r3f.docs.pmnd.rs/getting-started/examples, https://r3f.docs.pmnd.rs/getting-started/introduction, https://r3f.docs.pmnd.rs/getting-started/installation, https://r3f.docs.pmnd.rs/getting-started/your-first-scene, https://r3f.docs.pmnd.rs/api/canvas, https://r3f.docs.pmnd.rs/advanced/pitfalls, https://r3f.docs.pmnd.rs/advanced/scaling-performance, https://r3f.docs.pmnd.rs/tutorials/v9-migration-guide, https://r3f.docs.pmnd.rs/tutorials/loading-models, https://r3f.docs.pmnd.rs/llms.txt, https://github.com/pmndrs/react-three-fiber, https://github.com/pmndrs/react-three-fiber/blob/master/readme.md, https://github.com/pmndrs/react-three-fiber/blob/master/LICENSE, https://github.com/pmndrs/react-three-fiber/blob/master/packages/fiber/package.json, https://registry.npmjs.org/@react-three/fiber, https://registry.npmjs.org/@react-three/fiber/9.8.2, https://react.dev/blog/2024/04/25/react-19-upgrade-guide

### Mistakes to avoid
- Don't: @react-three/fiber@latest (9.x) in a project that still uses React 18 → Do: Use @react-three/fiber@8 with React 18, or upgrade the project to React 19 first (Each major version of the library pairs with one major version of React; 9.8.2 also caps React below 19.4.)
- Don't: useFrame(() => setX((x) => x + 0.1)) to animate → Do: useFrame((state, delta) => (ref.current.position.x += delta)) (State updates every frame push each frame through React; change the object through a ref and use delta so speed does not depend on the screen.)
- Don't: ReactDOM.render(...) copied from the no-build example on the installation page → Do: createRoot(document.getElementById('root')).render(...) from 'react-dom/client' (React 19, which version 9 needs, removed ReactDOM.render.)
- Don't: <Canvas shadows> with three 0.187 → Do: <Canvas shadows="percentage"> (or "basic" or "variance") (shadows={true} asks for PCFSoftShadowMap, which our demo run with three 0.187.0 reported as removed and replaced by PCFShadowMap.)
- Don't: Creating a new geometry or material for every item inside a list render → Do: Share them with useMemo, or use instancing for many similar objects (Each material and geometry has to be compiled and processed, which is slow.)

### Questions
- Can I use React Three Fiber in a paid product? Yes. The library is MIT licensed; keep its license notice with copies of the code.
- Does it do less than plain three.js? The makers say no; everything in three.js also works here.
- Which React version do I need? React 19 for version 9 of the library, React 18 for version 8.
- Can I load my own 3D models? Yes. The docs cover the common formats GLTF, FBX, OBJ and STL.
- Does it work in a Next.js site? Yes, though some three.js add-ons need three added to transpilePackages in next.config.js.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
