
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-visual-annotator
Advanced tools
Powerful React image and video annotation tool for machine learning, computer vision, and AI training data creation. Features rotatable bounding boxes, polygons, keypoints, segmentation with TypeScript support and Material-UI components.
A powerful React-based image and video annotation tool for machine learning, computer vision, and AI training data creation. Features rotatable bounding boxes with intuitive controls, perfect for creating datasets for YOLO, COCO, and other object detection models with TypeScript support and Material-UI components.
Try the React Visual Annotator instantly in your browser:

npm i react-visual-annotator
# or
yarn add react-visual-annotator
npm i @mui/material @mui/icons-material @emotion/react @emotion/styled lodash moment
# or
yarn add @mui/material @mui/icons-material @emotion/react @emotion/styled lodash moment
import React from "react";
import ReactImageAnnotate from "react-visual-annotator";
const App = () => (
<ReactImageAnnotate
labelImages
regionClsList={["Alpha", "Beta", "Charlie", "Delta"]}
regionTagList={["tag1", "tag2", "tag3"]}
images={[
{
src: "https://placekitten.com/408/287",
name: "Image 1",
regions: []
}
]}
/>
);
export default App;
To get the proper fonts, make sure to import the Inter UI or Roboto font, the following line added to a css file should suffice.
@import url("https://rsms.me/inter/inter.css");
The React Visual Annotator now supports rotating bounding boxes for more accurate annotations of rotated objects.
When using rotation, the bounding box data includes a rotation property:
const rotatedBox = {
type: "box",
id: "box1",
x: 0.2, // Normalized x coordinate (0-1)
y: 0.3, // Normalized y coordinate (0-1)
w: 0.4, // Normalized width (0-1)
h: 0.2, // Normalized height (0-1)
rotation: 45, // Rotation angle in degrees (0-360)
color: "#ff0000",
cls: "object"
};
All of the following properties can be defined on the Annotator...
| Prop | Type (* = required) | Description | Default |
|---|---|---|---|
taskDescription | *string | Markdown description for what to do in the image. | |
allowedArea | { x: number, y: number, w: number, h: number } | Area that is available for annotation. | Entire image. |
regionTagList | Array<string> | Allowed "tags" (mutually inclusive classifications) for regions. | |
regionClsList | Array<string> | Allowed "classes" (mutually exclusive classifications) for regions. | |
regionTagSingleSelection | boolean | Allowed select only one tag for image. | |
regionAllowedActions | {remove?:boolean, lock?:boolean, visibility?: boolean | Allowed actions for region in regions list. | Everything. |
imageTagList | Array<string> | Allowed tags for entire image. | |
imageClsList | Array<string> | Allowed classes for entire image. | |
enabledTools | Array<string> | Tools allowed to be used. e.g. "select", "create-point", "create-box", "create-polygon" | Everything. |
showTags | boolean | Show tags and allow tags on regions. | true |
selectedImage | string | URL of initially selected image. | |
images | Array<Image> | Array of images to load into annotator | |
showPointDistances | boolean | Show distances between points. | false |
pointDistancePrecision | number | Precision on displayed points (e.g. 3 => 0.123) | |
onExit | MainLayoutState => any | Called when "Save" is called. | |
RegionEditLabel | Node | React Node overriding the form to update the region (see RegionLabel component) | |
allowComments | boolean | Show a textarea to add comments on each annotation. | false |
hidePrev | boolean | Hide Previous Image button from the header bar. | false |
hideNext | boolean | Hide Next Image button from the header bar. | false |
hideClone | boolean | Hide Clone button from the header bar. | false |
hideSettings | boolean | Hide Settings button from the header bar. | false |
hideFullScreen | boolean | Hide FullScreen/Window button from the header bar. | false |
hideSave | boolean | Hide Save button from the header bar. | false |
This project uses Vite for development and building. To begin developing, run the following commands in the cloned repo:
yarn install - Install all dependenciesyarn start - Start the development serveryarn build - Build for productionNote: React and React-DOM are configured as peer dependencies for the published package, but are installed as dev dependencies for development. This ensures proper version compatibility in your projects.
The build process creates optimized bundles in the dist/ folder:
For development setup, see the instructions above.
If you get errors about missing modules, install all required peer dependencies:
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled lodash moment
If you encounter peer dependency warnings, ensure you have React 18+ installed:
npm install react@^18.0.0 react-dom@^18.0.0
Ensure you're using Material-UI v5.0.0 or higher:
npm install @mui/material@^5.0.0 @mui/icons-material@^5.0.0
This version includes comprehensive fixes for immutable object handling. If you still encounter circular reference errors, please file an issue with your specific use case.
The package now uses @monaco-editor/react instead of the deprecated react-monaco-editor. No action needed - the upgrade is automatic.
If you're looking for this package, you might have searched for:
🖼️ Screenshot & Live Demo Added
rotation property in annotation datareact-monaco-editor to @monaco-editor/react for better React 19 supporteditorWillMount is not a function compatibility issuesConsult these icon repositories:
FAQs
Powerful React image and video annotation tool for machine learning, computer vision, and AI training data creation. Features rotatable bounding boxes, polygons, keypoints, segmentation with TypeScript support and Material-UI components.
We found that react-visual-annotator 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.