
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@annotorious/plugin-arrows-react
Advanced tools
A React wrapper for the Annotorious Arrows Plugin, providing React components for easy integration with both image and OpenSeadragon annotators.
npm install @annotorious/plugin-arrows-react
import { useState } from 'react';
import { ImageAnnotator } from '@annotorious/annotorious';
import { ArrowsPlugin } from '@annotorious/plugin-arrows-react';
import '@annotorious/annotorious/annotorious.css';
import '@annotorious/plugin-arrows/annotorious-arrows.css';
export const App = () => {
const [mode, setMode] = useState<'draw' | 'select'>('select');
return (
<div>
<div>
<button onClick={() => setMode(mode => mode === 'select' ? 'draw' : 'select')}>
Mode: {mode}
</button>
</div>
<ImageAnnotator>
<img src="640px-Hallstatt.jpg" alt="Sample" />
</ImageAnnotator>
<ArrowsPlugin mode={mode} />
</div>
)
}
For OpenSeadragon, use the OSDArrowsPlugincomponent together with OpenSeadragonAnnotator from @annotorious/react.
import { useState } from 'react';
import OpenSeadragon from 'openseadragon';
import { OpenSeadragonAnnotator, OpenSeadragonViewer } from '@annotorious/react';
import { OSDArrowsPlugin } from '@annotorious/plugin-arrows-react';
import '@annotorious/openseadragon/annotorious-openseadragon.css';
import '@annotorious/plugin-arrows/annotorious-arrows.css';
const OSD_OPTIONS: OpenSeadragon.Options = {
// OpenSeadragon options
};
export const App = () => {
const [mode, setMode] = useState<'select' | 'draw'>('select');
return (
<div>
<div className="buttons">
<button onClick={() => setMode(mode => mode === 'select' ? 'draw' : 'select')}>
Mode: {mode}
</button>
</div>
<OpenSeadragonAnnotator>
<OpenSeadragonViewer options={OSD_OPTIONS} />
<OSDArrowsPlugin mode={mode} />
</OpenSeadragonAnnotator>
</div>
)
}
You can attach a custom selection popup with the OSDArrowPopup helper component.
import { OSDArrowsPlugin, OSDArrowPopup } from '@annotorious/plugin-arrows-react';
<OpenSeadragonAnnotator>
<OpenSeadragonViewer options={OSD_OPTIONS} />
<OSDArrowsPlugin mode={mode} />
<OSDArrowPopup
popup={props => <div>My custom popup</div>}
/>
</OpenSeadragonAnnotator>
FAQs
React bindings for the Annotorious arrows plugin.
We found that @annotorious/plugin-arrows-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.