Skip to content
Design System
GitHub

Annotated image

v0.18.0Beta

Boxes, points, polygons and poses over a picture, in its own pixel space: predicted solid, ground truth dashed, the previous version dotted, each on a halo; class words, a line-style legend, selection by keyboard, raster overlays, loading and failed states.

  • Predicted
  • Ground truth

Annotated image evaluation

Install
npx shadcn add @syncrobotic/annotated-image

Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/skeleton

Overview

A picture with boxes, points, polygons or poses drawn over it: what a model predicted, what a person labelled, the previous version.

When to use

  • Reviewing a model's detections against ground truth, frame by frame.
  • Comparing two versions of a model or of a dataset's labels on the same picture.
  • Showing what a camera saw when an event fired, with the object that fired it.

Use something else

  • Many pictures at once, without marks: Image grid.
  • Drawing or editing boxes: a labelling tool; this one shows and selects, it does not edit.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

  • Predicted
  • Previous version

Annotated image previous version

  • Predicted
  • Ground truth

Annotated image keypoints

  • Predicted
  • Ground truth
Class
forklift
Source
Predicted
Score
0.88

Annotated image selectable

  • Predicted
  • Ground truth
Class
forklift
Source
Predicted
Score
0.88

Annotated image labels selected only

  • Predicted

Annotated image depth overlay

Loading picture

Annotated image loading

  • Predicted
  • Ground truth

Annotated image failed

Usage rules

  • Coordinates are the picture's own pixels; give its natural width and height. The box keeps that aspect ratio, so the marks line up at any size.
  • Line style says where a mark came from (predicted solid, ground truth dashed, previous dotted); the class is the word on it. Never a colour per class, never status colours.
  • Keep the legend (or an AnnotationLegend nearby) whenever more than one kind is on screen.
  • Crowded picture, or a picture shown phone-wide: showLabels="selected". The words are still read out in the summary or on each annotation's button.
  • Selectable only when something happens on select (a details panel, a review); otherwise the picture is one image with a summary.

Changelog

  • 0.18.02026-11-19First release: AnnotatedImage (src or image, width, height, annotations of box, point, polygon and keypoints) with an SVG in the picture's pixel space and non-scaling strokes; predicted solid, ground truth dashed, previous dotted and faded, each on a halo; selected 3 px with handles; class words (all, selected or none); a role=img summary, or with onSelectedChange one Tab stop, arrows, Enter and Esc; overlays; loading and failed states; and AnnotationLegend for the kinds present.

How to upgrade