ReticleJS

Embed the editor

Start in the playground. Select an image, add an arrow, then select it in Regions. Compare the editor with the Recipient preview and download the flattened PNG. Undo and redo update both views.

Install Community

Download the Community SDK and place the file in your app directory. Install the versioned archive locally with npm.

npm install ./reticlejs-1.0.0.tgz

The archive includes Community source, TypeScript declarations, and AGPL terms. The vanilla example uses a Vite TypeScript app with a screenshot in its public folder.

Vanilla TypeScript

Place this markup in your HTML and run the TypeScript below from the app entry point.

<img id="photo" src="/screenshot.png" alt="Screenshot to annotate" hidden>
<div id="editor"></div>
<button id="arrow">Draw an arrow</button>
import { MarkerArea, ArrowMarker } from 'reticlejs';

const image = document.querySelector<HTMLImageElement>('#photo')!;
await image.decode();
const editor = new MarkerArea();
editor.style.cssText = 'display:block;height:400px';
document.querySelector('#editor')!.append(editor);
editor.targetImage = image;
document.querySelector('#arrow')!.addEventListener('click', () => {
  editor.createMarker(ArrowMarker);
});

Drag on the image to draw. Continue to save and export to retrieve the result.

React

For the React wrapper, install the restricted Pro archive supplied with your trial or license. Import the wrapper from @reticlejs/pro/wrappers/react and SDK types from @reticlejs/pro. The wrapper factory uses the app’s React instance. Render the component after your source image has loaded. The repository also includes a complete review workflow under examples/react-redaction-starter. The React wrapper belongs to the commercial edition. See licensing.

Copy the React example component into src/App.tsx in a Vite React TypeScript project. Put a screenshot in public/sample.png and run npm run dev. Select Arrow, drag across the image, and use Undo to revert.