Esc

comark-annotate

Components

screenshot, annotation, and compare, and the props each takes.

screenshot

An image with marks on it. Other content inside the block becomes the caption.

Playground
Filter toolbar on one row1
  1. 1
    Extra filters collapse into +2 filters.
Prop
src Image URL. Required.
alt What the screenshot shows. Required.
title Heading above the image, and the title of its zoomed view.
href The page you captured, linked by its host next to the title.
viewport Capture size in pixels, like 1440x900. A compare checks that both sides match.

annotation

A mark on the screenshot and its note. The content is the note. Props can be inline, in a YAML props block, or bound with :x. Notes in the list under the image are numbered. Side notes sit beside or above the image and point with an arrow instead.

Playground
Office correlations dashboard1A
A
r now counts the office cat.
  1. 1
    Export CSV includes the filters you set.
Prop
x y w h The marked area, as percentages of the image: numbers from 0 to 100, without %. All four are required.
mark box (default), circle, underline, highlight, cross, check, or none to let a side note's arrow do the pointing. none needs a side. Each mark wobbles a little differently, seeded by its box, so no two match and every render draws the same.
side left, right, or top puts the note beside or above the image with an arrow.
color blue (default) points something out, red flags a problem, amber a warning, green a fix, gray anything neutral. Each has a dark-mode value. A 3- or 6-digit hex color like #e11d48 works too, and its stamp gets whichever of a white or dark number reads better.

compare

Two screenshots side by side, titled Before and After unless they set their own title. Numbers continue from one side to the other, and the pair stacks on narrow screens. Notes with side="left" or side="right" join the numbered list under their screenshot, since beside it they'd sit against the other one and shrink their own image; notes with side="top" stay above.

With mode="slider", the two screenshots share one frame: Before shows left of a divider and After right of it. Drag anywhere on the pair, or focus the handle and use the arrow keys, to move it; a click on the screenshots that doesn't drag zooms the pair. Use it when both screenshots show the same spot and the change is small, so the reader sees it at full width. Side notes become numbered notes in the list, since an arrow would cross the divider. Without the script, the two screenshots stack.

Playground
Before
Toolbar wrapping1
  1. 1
    Apply sits lower than the chips.
After
Toolbar on one row2
  1. 2
    Fixed.
1 / 2
Prop
title What the comparison shows, read out by screen readers. Defaults to "Comparison".
mode columns (default) puts the screenshots side by side; slider lays them over each other with a divider to drag.