photocn

Headless

Bring your own design system. The engine and controller have no UI opinions.

useImageEditorState() from photocn/react returns the same API the components use. Attach canvasRef to a <canvas> (keyed by canvasKey) and stageRef to its container. Everything else is up to you, and no registry code is needed. To share the state with children, pass it to <ImageEditorProvider editor={editor}>.

Lower-level building blocks

To go deeper, photocn/hooks exposes the primitives the controller is built from: useMiniPhotoEditor, useEditorHistory, useCropGeometry, useHistogram and useExifMetadata. The framework-agnostic core (photocn, photocn/gl, photocn/exif) works without React.