npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@n-uf/doodl-react

v26.11.1

Published

React bindings for @n-uf/doodl — canvas component, page annotation layer, and document annotation helpers.

Readme

@n-uf/doodl-react

React bindings for @n-uf/doodl.

[!CAUTION]

Not yet stable

@n-uf/doodl-react is young and still changing. Its API and the saved-drawing JSON (the DrawingState of @n-uf/doodl and the per-page SerializedPageAnnotations) are not final.

Version numbers are dates (YY.M.R), not semantic versions, so any release may break things, including saved drawings that need converting. Pin an exact version and read the CHANGELOG before you upgrade. If you need a stable drawing canvas, use Excalidraw.

Install

pnpm add @n-uf/doodl-react @n-uf/doodl react react-dom

Toolbar items

toToolItems() maps doodl's annotation tool definitions to generic toolbar items (ToolItemLike, a structural twin of the ToolItem used by generic toolbar kits), with a default stroke icon for each tool (DRAW_TOOL_ICONS). isDrawTool() narrows a toolbar id back to a doodl DrawTool.

import { ToolToolbar } from "@n-uf/harbuz";
import { isDrawTool, toToolItems } from "@n-uf/doodl-react/tool-items";

<ToolToolbar items={toToolItems()} activeId={tool} onChange={(id) => isDrawTool(id) && setTool(id)} />

ToolToolbar comes from @n-uf/harbuz; doodl does not depend on it (or on any toolbar kit), the item shapes simply match. Any toolbar that renders { id, label, icon, tooltip, shortcut, group } items works.

Options: toToolItems(defs?, { only, shortcuts, icons }). defs defaults to ANNOTATION_TOOL_DEFINITIONS, which is a subset of doodl's tools (select, text highlight, text unhighlight, rectangle, freehand; ellipse, polygon, highlight and text are left out, pass your own defs to show them); only keeps a subset (definition order); shortcuts and icons override per tool; icons: false drops icons. Icons are render props ({ active, size }) => ReactNode on a 24×24 viewBox drawn with currentColor; the highlighter icon fills in while active.

Tooltips are "<description> (<KEY>)", for example "Freehand drawing (F)", or just the description when a shortcuts override removes the key. A definition without a description gets no tooltip, so the toolbar's default "Label (K)" applies.

@n-uf/doodl-react/tool-items is a client module (its build carries "use client", like the rest of doodl-react): call toToolItems() in client components.

The adapter is also exported from the package root. useAnnotationShortcuts and getToolTooltip are deprecated in favor of the generic toolbar's useToolShortcuts and formatToolTooltip (from @n-uf/angiospermae). useAnnotationShortcuts keeps its original, weaker ignore rules (Ctrl/Cmd/Alt combos and input/textarea only).

Shortcuts

Shortcut keys follow TOOL_CONFIGS in @n-uf/doodl: V select, R rectangle, O ellipse, P polygon, F freehand, H highlight, T text, M text highlight, U text unhighlight.