# React canvas libraries

React canvas libraries draw graphics on an HTML canvas element through React components. A renderer keeps a scene graph of shapes or objects and redraws the canvas when their props change. These libraries let drawing tools, signature pads, and design editors render interactive graphics in the browser.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [@react-three/fiber](#react-three-fiber) | 35.7M | 33.8K | Oct 2026 | MIT |
| [React Konva](#react-konva) | 10.9M | 6.4K | Oct 2026 | MIT |
| [React Native Skia](#shopify-react-native-skia) | 8.9M | 8.8K | Oct 2026 | MIT |
| [react-signature-canvas](#react-signature-canvas) | 6.4M | 653 | Mar 2025 | Apache-2.0 |
| [Excalidraw](#excalidraw-excalidraw) | 5.2M | 135.9K | Apr 2026 | MIT |
| [tldraw](#tldraw) | 2.8M | 51.5K | Nov 2026 | tldraw license (production license required) |
| [react-zdog](#react-zdog) | 1.6M | 454 | Aug 2023 | MIT |
| [@pixi/react](#pixi-react) | 570.9K | 2.9K | Dec 2025 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[@react-three/fiber](#react-three-fiber) has the most monthly downloads in this comparison, at 35.7M.

## Capabilities

| Library | GPU scene renderer | SVG scene renderer |
| --- | --- | --- |
| [@react-three/fiber](#react-three-fiber) | Yes | No |
| [React Konva](#react-konva) | No | No |
| [React Native Skia](#shopify-react-native-skia) | Yes | No |
| [react-signature-canvas](#react-signature-canvas) | No | No |
| [Excalidraw](#excalidraw-excalidraw) | No | No |
| [tldraw](#tldraw) | No | Yes |
| [react-zdog](#react-zdog) | No | Yes |
| [@pixi/react](#pixi-react) | Yes | No |

## Libraries

### @react-three/fiber

[GitHub](https://github.com/pmndrs/react-three-fiber) · [npm](https://www.npmjs.com/package/@react-three/fiber) · [Docs](https://docs.pmnd.rs/react-three-fiber)

Renders Three.js scenes through React components.

- Downloads / mo: 35.7M
- Stars: 33.8K
- Last release: 9.8.2
- License: MIT
- Capabilities: [From the @react-three/fiber docs](https://docs.pmnd.rs/react-three-fiber)

**Strengths**

- **Builds interactive 3D scenes.** Compose reusable scene components and animate them in the render loop.
- **Exposes renderer and scene state.** Read the active renderer, scene, and camera through useThree.

**Watch out for**

- **Hooks require Canvas context.** Call useFrame and useThree inside the Canvas component tree.

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

**pmndrs/drei** (10.2K stars)

[pmndrs/drei](https://github.com/pmndrs/drei) 

```tsx
export function useCubeCamera({ resolution = 256, near = 0.1, far = 1000, envMap, fog }: CubeCameraOptions = {}) {
  const gl = useThree(({ gl }) => gl)
  const scene = useThree(({ scene }) => scene)

  const fbo = useMemo(() => {
    const fbo = new WebGLCubeRenderTarget(resolution)
    fbo.texture.type = HalfFloatType
    return fbo
  }, [resolution])

  useEffect(() => {
    return () => {
      fbo.dispose()
    }
  }, [fbo])

  const camera = useMemo(() => new THREE.CubeCamera(near, far, fbo), [near, far, fbo])

  let originalFog
  let originalBackground
  const update = React.useCallback(() => {
    originalFog = scene.fog
    originalBackground = scene.background
    scene.background = envMap || originalBackground
    scene.fog = fog || originalFog
    camera.update(gl, scene)
    scene.fog = originalFog
    scene.background = originalBackground
  }, [gl, scene, camera])

  return {
    fbo,
    camera,
    update,
  }
}

```

[src/core/CubeCamera.tsx](https://github.com/pmndrs/drei/blob/bf6f4addf47467d3885de272d94ca5127f6ef68f/src/core/CubeCamera.tsx#L20-L55) · [More projects using @react-three/fiber →](https://dashboard.exa.ai/playground/search?q=Public%20React%20projects%20using%20%40react-three/fiber%20for%20canvas%20drawing%2C%20scene%20interaction%2C%20signature%20capture%20and%20image%20export&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import React from 'react'
import { Canvas } from '@react-three/fiber'

const App = () => (
  <Canvas>
    <pointLight position={[10, 10, 10]} />
    <mesh>
      <sphereGeometry />
      <meshStandardMaterial color="hotpink" />
    </mesh>
  </Canvas>
)

```

From [readme.md](https://r3f.docs.pmnd.rs/api/canvas)

### React Konva

[GitHub](https://github.com/konvajs/react-konva) · [npm](https://www.npmjs.com/package/react-konva) · [Docs](https://konvajs.org/docs/react/index.html)

Provides declarative React components for a two-dimensional canvas scene graph.

- Downloads / mo: 10.9M
- Stars: 6.4K
- Last release: 19.3.2
- License: MIT
- Capabilities: [From the React Konva docs](https://konvajs.org/docs/react/index.html)

**Strengths**

- **Builds interactive scene graphs.** Compose shapes, images, and groups as React components.
- **Exports composed canvas images.** Use a node ref to export the rendered drawing as PNG.

**Watch out for**

- **Manual changes can outlive renders.** Enable its strict mode when supplied props must be restored on every update.

```sh
npm install react-konva konva
```

**mrgoonie/winshot** (589 stars)

[mrgoonie/winshot](https://github.com/mrgoonie/winshot) 

```tsx
(e: Konva.KonvaEventObject<MouseEvent>) => {
    // Handle pan move
    if (isPanning) {
      handlePanMove(e);
      return;
    }

    if (!isDrawing || !drawStart || !tempAnnotation) return;

    const stage = e.target.getStage();
    if (!stage) return;

    const pos = stage.getPointerPosition();
    if (!pos) return;

    // Convert to unscaled coordinates (accounting for stage position including pan offset and centering)
    const stageX = stage.x();
    const stageY = stage.y();
    const x = (pos.x - stageX) / scale;
    const y = (pos.y - stageY) / scale;

    const width = x - drawStart.x;
    const height = y - drawStart.y;

    if (tempAnnotation.type === 'arrow' || tempAnnotation.type === 'line') {
      setTempAnnotation({
        ...tempAnnotation,
        points: [0, 0, width, height],
        width: width,
        height: height,
      });
    } else {
      // For rectangle and ellipse, handle negative dimensions
      const newX = width < 0 ? x : drawStart.x;
      const newY = height < 0 ? y : drawStart.y;
      setTempAnnotation({
        ...tempAnnotation,
        x: newX,
        y: newY,
        width: Math.abs(width),
        height: Math.abs(height),
      });
    }
  }

```

[frontend/src/components/editor-canvas.tsx](https://github.com/mrgoonie/winshot/blob/a36760ed1a2bda2074fa1b73b3ca24b837061512/frontend/src/components/editor-canvas.tsx#L537-L580) · [More projects using React Konva →](https://dashboard.exa.ai/playground/search?q=Public%20React%20projects%20using%20react-konva%20for%20canvas%20drawing%2C%20scene%20interaction%2C%20signature%20capture%20and%20image%20export&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import {useState} from 'react';
import {Stage, Layer, Rect} from 'react-konva';

export default function App() {
  const [color, setColor] = useState('#00a8e8');
  return (
    <Stage width={600} height={400}>
      <Layer>
        <Rect
          x={50} y={50} width={120} height={80}
          fill={color} draggable
          onClick={() => setColor(color === '#00a8e8' ? '#ff7a00' : '#00a8e8')}
        />
      </Layer>
    </Stage>
  );
}

```

From [README.md](https://github.com/konvajs/react-konva/blob/master/README.md)

### React Native Skia

[GitHub](https://github.com/wcandillon/react-native-skia) · [npm](https://www.npmjs.com/package/@shopify/react-native-skia) · [Docs](https://wcandillon.github.io/react-native-skia/)

Renders React Native graphics with Skia.

- Downloads / mo: 8.9M
- Stars: 8.8K
- Last release: 2.14.0
- License: MIT
- Capabilities: [From the React Native Skia docs](https://wcandillon.github.io/react-native-skia/)

```sh
npm install @shopify/react-native-skia
```

**Quickstart**

```tsx
import { WithSkiaWeb } from "@shopify/react-native-skia/lib/module/web";
import { version } from "canvaskit-wasm/package.json";

export default function App() {
  return (
    <WithSkiaWeb
      opts={{ locateFile: (file) => `https://cdn.jsdelivr.net/npm/canvaskit-wasm@${version}/bin/full/${file}` }}
      getComponent={() => import("./MySkiaComponent")}
    />
  );
}

```

From [web.mdx](https://github.com/Shopify/react-native-skia/blob/55607125aeedf89f443436c96c516eb70217f09e/apps/docs/docs/getting-started/web.mdx) · [Find projects using React Native Skia →](https://dashboard.exa.ai/playground/search?q=%40shopify/react-native-skia%20GitHub%20projects)

### react-signature-canvas

[GitHub](https://github.com/agilgur5/react-signature-canvas) · [npm](https://www.npmjs.com/package/react-signature-canvas) · [Docs](https://agilgur5.github.io/react-signature-canvas/)

Wraps signature_pad with a React canvas component.

- Downloads / mo: 6.4M
- Stars: 653
- Last release: 1.1.0-alpha.2
- License: Apache-2.0
- Capabilities: [From the react-signature-canvas docs](https://agilgur5.github.io/react-signature-canvas/)

**Strengths**

- **Captures and restores signature strokes.** Read point groups with toData and restore them with fromData.
- **Exports trimmed signature images.** Trim surrounding whitespace before obtaining a signature image.

**Watch out for**

- **Resize clears signatures by default.** Set clearOnResize=false when resizing should preserve the current signature.

```sh
npm i -S react-signature-canvas
```

**documenso/documenso** (15.8K stars)

[documenso/documenso](https://github.com/documenso/documenso) 

```tsx
export default function SignatureDialog(props: any) {
  const [currentTab, setCurrentTab] = useState(tabs[0]);
  const [typedSignature, setTypedSignature] = useState("");
  const [signatureEmpty, setSignatureEmpty] = useState(true);
  // This is a workaround to prevent the canvas from being rendered when the dialog is closed
  // we also need the debounce to avoid rendering while transitions are occuring.
  const showCanvas = useDebouncedValue<boolean>(props.open, 1);
  let signCanvasRef: any | undefined;

  useEffect(() => {
    setTypedSignature(localStorage.getItem("typedSignature") || "");
  }, []);

  return (
    <>
      <Transition.Root show={props.open} as={Fragment}>
        <Dialog
          as="div"
          className="relative z-10"
          onClose={() => {
            props.setOpen(false);
            setCurrent(tabs[0]);
          }}>
          <Transition.Child
            as={Fragment}
            enter="ease-out duration-300"
            enterFrom="opacity-0"
            enterTo="opacity-100"
            leave="ease-in duration-200"
            leaveFrom="opacity-100"
            leaveTo="opacity-0">
            <div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" />
          </Transition.Child>

          <div className="fixed inset-0 z-10 overflow-y-auto">
            <div className="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
              <Transition.Child
                as={Fragment}
                enter="ease-out duration-300"
                enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
                enterTo="opacity-100 translate-y-0 sm:scale-100"
                leave="ease-in duration-200"
                leaveFrom="opacity-100 translate-y-0 sm:scale-100"
                leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95">
                <Dialog.Panel className="relative min-h-[350px] transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6">
                  <div className="">
                    <div className="mb-3 border-b border-gray-200">
                      <nav className="-mb-px flex space-x-8" aria-label="Tabs">
                        {tabs.map((tab) => (
                          <a
                            key={tab.name}
                            onClick={() => {
                              setCurrent(tab);
                            }}
                            className={classNames(
                              tab.current
                                ? "border-neon text-neon"
                                : "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",
                              "group inline-flex cursor-pointer items-center border-b-2 py-4 px-1 text-sm font-medium"
                            )}
                            aria-current={tab.current ? "page" : undefined}>
                            <tab.icon
                              className={classNames(
                                tab.current
                                  ? "text-neon"
                                  : "text-gray-400 group-hover:text-gray-500",
                                "-ml-0.5 mr-2 h-5 w-5"
                              )}
                              aria-hidden="true"
                            />
                            <span>{tab.name}</span>
                          </a>
                        ))}
                      </nav>
                    </div>
                    {isCurrentTab("Type") ? (
                      <div>
                        <div className="my-8 mb-3 border-b border-gray-300">
                          <input
                            value={typedSignature}
                            onChange={(e) => {
                              setTypedSignature(e.target.value);
                            }}
                            className={classNames(
                              typedSignature ? "font-qwigley text-4xl" : "",
                              "focus:border-neon focus:ring-neon mt-14 block h-10 w-full text-center align-bottom text-2xl leading-none"
                            )}
                            placeholder="Kindly type your name"
                          />
                        </div>
                        <div className="float-right">
                          <Button
                            color="secondary"
                            onClick={() => {
                              props.onClose();
                              props.setOpen(false);
                              setCurrent(tabs[0]);
                            }}>
                            Cancel
                          </Button>
                          <Button
                            className="ml-3"
                            disabled={!typedSignature}
                            onClick={() => {
                              localStorage.setItem("typedSignature", typedSignature);
                              props.onClose({
                                type: "type",
                                typedSignature: typedSignature,
                              });
                            }}>
                            Sign
                          </Button>
                        </div>
                      </div>
                    ) : (
                      ""
                    )}
                    {isCurrentTab("Draw") ? (
                      <div className="" key={props.open ? "closed" : "open"}>
                        {showCanvas && (
                          <SignatureCanvas
                            ref={(ref) => {
                              signCanvasRef = ref;
                            }}
                            canvasProps={{
                              className: "sigCanvas border-b b-2 border-slate w-full h-full mb-3",
                            }}
                            clearOnResize={true}
                            onEnd={() => {
                              setSignatureEmpty(signCanvasRef?.isEmpty());
                            }}
                          />
                        )}
                        <IconButton
                          className="float-left block"
                          icon={TrashIcon}
                          onClick={() => {
                            signCanvasRef?.clear();
                            setSignatureEmpty(signCanvasRef?.isEmpty());
                          }}></IconButton>
                        <div className="float-right mt-10">
                          <Button
                            color="secondary"
                            onClick={() => {
                              props.onClose();
                              props.setOpen(false);
                              setCurrent(tabs[0]);
                            }}>
                            Cancel
                          </Button>
                          <Button
                            className="ml-3"
                            onClick={() => {
                              props.onClose({
                                type: "draw",
                                signatureImage: signCanvasRef.toDataURL("image/png"),
                              });
                            }}
                            disabled={signatureEmpty}>
                            Sign
                          </Button>
                        </div>
                      </div>
                    ) : (
                      ""
                    )}
                  </div>
                </Dialog.Panel>
              </Transition.Child>
            </div>
          </div>
        </Dialog>
      </Transition.Root>
    </>
  );

  function isCurrentTab(tabName: string): boolean {
    return currentTab.name === tabName;
  }

  function setCurrent(t: any) {
    tabs.forEach((tab) => {
      tab.current = tab.name === t.name;
    });
    setCurrentTab(t);
  }
}

```

[apps/web/components/editor/signature-dialog.tsx](https://github.com/documenso/documenso/blob/d2301a923b77b2fde53d160a060f2f1e8f968bf6/apps/web/components/editor/signature-dialog.tsx#L15-L201) · [More projects using react-signature-canvas →](https://dashboard.exa.ai/playground/search?q=Public%20React%20projects%20using%20react-signature-canvas%20for%20canvas%20drawing%2C%20scene%20interaction%2C%20signature%20capture%20and%20image%20export&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import React from 'react'
import { createRoot } from 'react-dom/client'
import SignatureCanvas from 'react-signature-canvas'

createRoot(
  document.getElementById('my-react-container')
).render(
  <SignatureCanvas penColor='green'
    canvasProps={{width: 500, height: 200, className: 'sigCanvas'}} />,
)

```

From [index.js](https://github.com/agilgur5/react-signature-canvas/blob/main/README.md)

### Excalidraw

[GitHub](https://github.com/excalidraw/excalidraw) · [npm](https://www.npmjs.com/package/@excalidraw/excalidraw) · [Docs](https://excalidraw.com)

Provides Excalidraw as a React component.

- Downloads / mo: 5.2M
- Stars: 135.9K
- Last release: 0.18.1
- License: MIT
- Capabilities: [From the Excalidraw docs](https://excalidraw.com)

```sh
npm install react react-dom @excalidraw/excalidraw
```

**Quickstart**

```tsx
import { Excalidraw } from "@excalidraw/excalidraw";
import "@excalidraw/excalidraw/index.css";

export default function App() {
  return (
    <div style={{ height: "100vh" }}>
      <Excalidraw />
    </div>
  );
}

```

From [README.md](https://github.com/excalidraw/excalidraw/blob/master/packages/excalidraw/README.md) · [Find projects using Excalidraw →](https://dashboard.exa.ai/playground/search?q=%40excalidraw/excalidraw%20GitHub%20projects)

### tldraw

[GitHub](https://github.com/tldraw/tldraw) · [npm](https://www.npmjs.com/package/tldraw) · [Docs](https://tldraw.dev)

Provides a small drawing editor.

- Downloads / mo: 2.8M
- Stars: 51.5K
- Last release: 5.6.1
- License: tldraw license (production license required)
- Capabilities: [From the tldraw docs](https://tldraw.dev)

```sh
npm install tldraw
```

**Quickstart**

```tsx
import { Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'

export default function App() {
	return (
		<div style={{ position: 'fixed', inset: 0 }}>
			<Tldraw />
		</div>
	)
}

```

From [quick-start.mdx](https://tldraw.dev/quick-start) · [Find projects using tldraw →](https://dashboard.exa.ai/playground/search?q=tldraw%20GitHub%20projects)

### react-zdog

[GitHub](https://github.com/pmndrs/react-zdog) · [npm](https://www.npmjs.com/package/react-zdog)

Renders zdog scenes through a React Fiber renderer.

- Downloads / mo: 1.6M
- Stars: 454
- Last release: 1.2.2
- License: MIT
- Capabilities: [From the react-zdog docs](https://github.com/pmndrs/react-zdog)

```sh
npm install zdog react-zdog
```

**Quickstart**

```tsx
import { Illustration, Shape } from "react-zdog";

export default function App() {
  return (
    <Illustration zoom={8}>
      <Shape stroke={20} color="lightblue" rotate={{ x: Math.PI }} />
    </Illustration>
  );
}

```

From [readme.md](https://github.com/pmndrs/react-zdog/blob/master/readme.md) · [Find projects using react-zdog →](https://dashboard.exa.ai/playground/search?q=react-zdog%20GitHub%20projects)

### @pixi/react

[GitHub](https://github.com/pixijs/pixi-react) · [npm](https://www.npmjs.com/package/@pixi/react) · [Docs](https://react.pixijs.io/)

Writes PixiJS applications in a declarative React style.

- Downloads / mo: 570.9K
- Stars: 2.9K
- Last release: 8.0.5
- License: MIT
- Capabilities: [From the @pixi/react docs](https://react.pixijs.io/)

```sh
npm install pixi.js@^8.2.6 @pixi/react
```

**Quickstart**

```tsx
import {Application, extend} from '@pixi/react'
import {Graphics} from 'pixi.js'
import {useCallback} from 'react'
extend({Graphics})

const MyComponent = () => {
  const draw = useCallback(graphics => {
    graphics.clear()
    graphics.setFillStyle({color: 'red'})
    graphics.rect(0, 0, 100, 100)
    graphics.fill()
  }, [])
  return <Application><pixiGraphics draw={draw} /></Application>
}

```

From [README.md](https://github.com/pixijs/pixi-react/blob/main/README.md) · [Find projects using @pixi/react →](https://dashboard.exa.ai/playground/search?q=%40pixi/react%20GitHub%20projects)

## FAQ

### Which React canvas library should I use?

[React Konva](#react-konva) suits two-dimensional canvas scenes built from shapes, images, and groups. [@react-three/fiber](#react-three-fiber) suits Three.js scenes. [react-signature-canvas](#react-signature-canvas) suits signature capture.

### What is tldraw?

[tldraw](#tldraw) provides a small drawing editor.

### What is React Konva?

[React Konva](#react-konva) provides declarative React components for a two-dimensional canvas scene graph. A node ref exports the rendered drawing as a PNG image.

### How do I capture a signature in React?

[react-signature-canvas](#react-signature-canvas) wraps signature_pad in a React canvas component. Its toData and fromData methods save and restore signature strokes.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best React canvas libraries React Konva React Three Fiber React Sketch Canvas react-signature-canvas code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
