Primitive

Diagram Legend

Diagram-specific legend marks for node and edge vocabularies.

Use DiagramLegend when a canvas needs visual explanation for node categories and edge line styles. Use Legend for data-tone legends; this primitive is specifically for diagram grammar.
diagram
Diagram LegendDefault

Playground

Controls update query params directly, so every primitive state can be linked, rendered, and screenshotted deterministically.

Loading playground

Rendered matrix

Every state maps to the same primitive render route through the state query param.

Default

Canvas grammar legend.

Custom

Custom legend subset for generated explainers.

Public contract

The public prop table is generated from item metadata and schema-backed controls.
NameTypeDefaultDescription
itemsreadonly DiagramLegendItem[]-Legend item labels and mark kinds.
childrennever-Legend anatomy is fixed through item data.