A shaded span over an x range — a lap, a zone, a selected interval. Its label flies as a flag off the left edge.
Props
Start x in axis units (time or value).
End x in axis units.
edgesbooleanDraw the vertical side outlines at from/to. Default true.
false shades the span with no edge lines (fill only) — a soft highlight
band. Edit-mode resizing still works (the grab areas are invisible).
editingbooleanWhen true, this mark is in single-annotation edit (the double-click
target): handles stay out, it's draggable, and it reads as level 1 — while
other marks stay static. Independent of the container's global
editAnnotations. Pair with onEditAnnotation (the consumer holds an
editingId and sets editing={editingId === id}).
hoveredbooleanControlled hover (OR'd with pointer hover) — lets a legend row light the mark
remotely. Pair with the container's onHoverAnnotation to sync both ways.
idstringStable consumer id — a click (or double-click outside edit) reports it via
onSelectAnnotation.
labelstring | falseChip label. Omit to auto-label from–to with the shared x formatter; pass
false (or '') to render no label chip — e.g. an inert
selectable={false} highlight band, where the auto-label would just show
raw axis values.
onChange(next: { from: number; to: number }) => voidMake the region editable (in edit mode): drag the body to move it (both
edges shift), drag an edge to resize. Reports the new { from, to }.
selectablebooleanWhether the region responds to hover + selection (default true). When
false it's inert background context — drawn at the back (level 3) always,
and the double-click hit-test skips it.
selectedbooleanControlled selection — brightens to the front (level 1; the body too). Edge
handles are an edit-mode hover affordance, not a selection cue. Ignored if not
selectable.