Shape of the element cells stored in the graph.
Shape of the link cells stored in the graph.
Optional ReadonlyautoReference point that stays fixed when an auto-sized element's measured
size changes (via useMeasureElement). Mirrors CSS transform-origin semantics.
'top-left' (default): element grows right/down.'center': element grows symmetrically, its geometric center stays put.Only affects measurement-driven writes. Manual cell.resize(), interactive
resize tools, and direct cell.set('size', ...) calls are unaffected.
Optional ReadonlycellBase model class used for every cell the graph constructs from JSON. Maps to
the (deprecated) cellModel option of dia.Graph; prefer cellNamespace,
which registers shapes by type and supports per-type model classes.
Optional ReadonlycellCell namespace passed to new dia.Graph. Your entries are merged on top of
the built-ins, so JointJS shapes and the @joint/react ElementModel
/ LinkModel stay available even when you register custom shapes.
Optional ReadonlycellsControlled cells array. Whenever this array changes, the graph is re-synced
to match it (and initialCells is ignored); passing the same reference on a
re-render does not re-sync. Pair it with onCellsChange to mirror user edits
back into your own state.
Optional ReadonlychildrenReact children rendered inside the provider, typically a <Paper />.
Optional ReadonlygraphPre-existing JointJS graph instance to use. If omitted, GraphProvider
creates a fresh new dia.Graph(...).
Optional ReadonlyinitialCells used to seed the graph once, at mount, for uncontrolled mode. Later
changes to this array are not applied. Ignored when cells is provided.
Optional ReadonlyonFires after each graph change with the full, updated cells array. Use it to keep external React state in sync with the graph; it is notification only and does not itself write anything back into the graph.
Optional ReadonlyonFires after each commit with the granular added / changed / removed
delta, so you can apply just the change to an external store (Redux, Zustand,
etc.). Works in both controlled and uncontrolled mode.
Props for GraphProvider — pick the graph source (existing instance, initial cells, or a controlled cells array) and subscribe to changes.