@scribblesvg/react-utils
React components for diagram display and editing
@scribblesvg/react-utils provides React surfaces over @scribblesvg/core:
DiagramCanvas— interactive editorDiagramRenderer— read-only SVG view
Install
pnpm add @scribblesvg/react-utils @scribblesvg/corePeer dependencies: React 18 or 19.
Subpath exports
| Import | Contents |
|---|---|
@scribblesvg/react-utils/editor.css | Built-in styles for DiagramCanvas |
@scribblesvg/react-utils/renderer | DiagramRenderer, color presets and helpers |
@scribblesvg/react-utils/editor | DiagramCanvas, toolbar, hooks, hit-testing |
@scribblesvg/react-utils/icons | DiagramIcon, resolveDiagramIcon, catalog helpers |
@scribblesvg/react-utils/colors | DiagramColors, resolveDiagramColors, presets |
The editor entry also exports lower-level pieces if you want to build your own UI: useCanvasReducer, interaction hooks, coordinate utils, hit testing.
License
MIT