Skip to Content
React Flow 13 is here! Read the announcement →
ReferenceTypes

SetCenterOptions

Source on GitHub 

The SetCenterOptions type is used to configure the setCenter function you get from useReactFlow. Next to the shared viewport helper options duration, ease and interpolate, you can set the zoom level the viewport should have once it is centered.

Fields

NameTypeDefault
durationnumber
ease(t: number) => number
interpolate"smooth" | "linear"
zoomnumber