Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@opendrawjs/react

Latest version: v0.1.1

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: thenormvg
0 Stars
1 Forks
1 Versions
302 Downloads
TypeScript Repo language

Scan summary

@opendrawjs/react was last scanned on 29 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 29 Nov 2026.
  • Findings: No rules fired in version 0.1.1.
  • Downloads: 302 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 29 Nov 2026 No rules fired

No rules fired in 0.1.1

Findings

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@opendrawjs/react renders the opendraw editor in React: the hand-drawn canvas with every gesture and keyboard shortcut, a toolbar, zoom and history controls, a theme toggle and autosave. It is a thin layer over the framework-free @opendrawjs/editor, so the drawing behavior is identical to the Vue and Svelte versions.

Install

npm install @opendrawjs/react
# or: pnpm add @opendrawjs/react · yarn add @opendrawjs/react · bun add @opendrawjs/react

Requires React 18.2 or newer (React 19 works too).

Quick start

Import the styles once, then render <OpenDraw> in a container with a height:

import '@opendrawjs/react/styles.css'
import { OpenDraw } from '@opendrawjs/react'

export function Board() {
  return (
    <div style={{ height: '100vh' }}>
      <OpenDraw />
    </div>
  )
}

That's a working whiteboard that saves to localStorage as you draw.

Next.js: the editor needs the browser, so render it in a client component ('use client'), or load it with dynamic(() => import('./Board'), { ssr: false }).

<OpenDraw>

import type { OpenDrawState } from '@opendrawjs/react'

function save(state: OpenDrawState) {
  // send state.elements to your API, or anywhere else
}

<OpenDraw theme="dark" persist="team-board" onChange={save} />
Prop Type Default
theme 'light' \| 'dark' \| 'system' 'system' Starting theme. A theme the user picked (and saved) wins over it.
persist boolean \| string true Autosave to localStorage. A string is the storage key; false turns it off.
initialElements OpenDrawElement[] [] The scene to start with when nothing is saved.
ui 'full' \| 'none' 'full' full: toolbar, zoom, history and theme · none: the bare canvas.
onChange (state: OpenDrawState) => void Every document or editor-state change.
editor EditorController Bring your own controller to drive the editor from outside.
children ReactNode Your own overlay content, rendered inside the editor.
className · style On the editor's root element.

Drive it from outside

Create the controller yourself with useOpenDrawEditor(), pass it in, and read any state with useEditorState(). Every command is undoable.

import '@opendrawjs/react/styles.css'
import { OpenDraw, useEditorState, useOpenDrawEditor } from '@opendrawjs/react'

export function Board() {
  const editor = useOpenDrawEditor()
  const selected = useEditorState(editor, (e) => e.selectedElements.length)
  const canUndo = useEditorState(editor, (e) => e.canUndo)

  return (
    <div style={{ height: '100vh' }}>
      <OpenDraw editor={editor}>
        <div className="my-actions">
          <button disabled={selected === 0} onClick={() => editor.changeStyle({ strokeColor: '#e03131' })}>
            Make it red
          </button>
          <button disabled={!canUndo} onClick={() => editor.undo()}>Undo</button>
          <button onClick={() => editor.exportPNG('diagram')}>Export PNG</button>
        </div>
      </OpenDraw>
    </div>
  )
}

useEditorState(editor, read) re-renders only when what read returns changes. Return values the editor already holds (like e.selectedElements or e.activeTool), not new arrays or objects made in read.

Your own UI

Render only the canvas with <OpenDrawCanvas> and build the chrome yourself. The canvas keeps every gesture, shortcut and the text editor; add useScenePersistence() for autosave.

import '@opendrawjs/react/styles.css'
import { OpenDrawCanvas, useEditorState, useOpenDrawEditor, useScenePersistence } from '@opendrawjs/react'

export function Board() {
  const editor = useOpenDrawEditor()
  useScenePersistence(editor, { persist: 'my-board' })
  const tool = useEditorState(editor, (e) => e.activeTool)

  return (
    <div className="opendraw" data-opendraw-root style={{ height: '100vh' }}>
      <OpenDrawCanvas editor={editor} />
      <nav className="my-toolbar">
        <button aria-pressed={tool === 'rectangle'} onClick={() => editor.setActiveTool('rectangle')}>Rectangle</button>
        <button aria-pressed={tool === 'arrow'} onClick={() => editor.setActiveTool('arrow')}>Arrow</button>
      </nav>
    </div>
  )
}

The editor controller (EditorController) exposes the whole API: state getters such as elements, selectedElements, activeTool, theme, viewport, canUndo; and commands such as setActiveTool, changeStyle, changeArrowType, groupSelection, alignSelection, undo, zoomToFitAll, serialize, loadFile, exportPNG, exportSVG and saveToFile. See @opendrawjs/editor.

Exports

Export
OpenDraw The full editor.
OpenDrawCanvas The canvas alone, for your own UI.
Toolbar · Footer · ArrowTypePicker The built-in pieces, to compose your own layout.
useOpenDrawEditor(options?) Create a controller for this component's lifetime.
useEditorState(editor, read) Subscribe to a slice of editor state.
useScenePersistence(editor, { persist, theme }) Autosave and restore.
createEditor · EditorController Re-exported from @opendrawjs/editor.
OpenDrawState · OpenDrawElement · OpenDrawAppState · OpenDrawFile Scene types, re-exported from @opendrawjs/core.
@opendrawjs/react/styles.css The editor styles.

Theming

The chrome is styled with CSS custom properties on .opendraw. Override them from a wrapper:

.my-board .opendraw {
  --od-accent: #2563eb;
  --od-brand-active: #1d4ed8;
  --od-accent-soft: #dbeafe;
  --od-on-accent-soft: #1e3a8a;
  --od-hover: #eff6ff;
}

.my-board .opendraw[data-theme='dark'] {
  --od-accent: #60a5fa;
  --od-brand-active: #93c5fd;
  --od-accent-soft: #1e3a8a;
  --od-on-accent-soft: #dbeafe;
  --od-hover: #1e2a44;
}

Keyboard shortcuts

V / 1 Select R / 2 Rectangle D / 3 Diamond O / 4 Ellipse
A / 5 Arrow L / 6 Line P / 7 Draw T / 8 Text
N Sticky note 9 Image E / 0 Eraser F Frame · K Laser
⌘ Z Undo ⌘ G Group ⌘ D Duplicate ⌘ A Select all

On Windows and Linux, Ctrl replaces ⌘.

Other frameworks

Package
@opendrawjs/nuxt Nuxt and Vue, with the full editor UI (properties panel, menus, many drawings).
@opendrawjs/svelte The same editor for Svelte 5.
@opendrawjs/editor The framework-free editor.
@opendrawjs/core The engine: element model, history, rendering and export.

Links

opendraw is an independent project, built with gratitude to Excalidraw, whose design and code it learns from (some parts are ported under Excalidraw's MIT license). It is not affiliated with Excalidraw.

License

MIT © 2026 Vishnu

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @opendrawjs/react

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229