Skip to content

API Reference / @gtkx/animated / ControllerProps

Interface: ControllerProps<State, Item>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:836

Props for Controller methods and constructor.

Extends

Type Parameters

State

State extends Lookup = Lookup

Item

Item = undefined

Properties

cancel?

optional cancel?: MatchProp<State>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:899

Cancel all animations by using true, or some animations by using a key or an array of keys.

Inherited from

AnimationProps.cancel


config?

optional config?: Partial<AnimationConfig> | ((key) => SpringConfig)

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:886

Configure the spring behavior for each key.

Inherited from

AnimationProps.config


default?

optional default?: boolean | SpringProps<State>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:916

Override the default props with this update.

Inherited from

AnimationProps.default


delay?

optional delay?: number | ((key) => number)

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:890

Milliseconds to wait before applying the other props.

Inherited from

AnimationProps.delay


from?

optional from?: Falsy | GoalValues<State>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:838


immediate?

optional immediate?: MatchProp<State>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:894

When true, props jump to their goal values instead of animating.

Inherited from

AnimationProps.immediate


loop?

optional loop?: LoopProp<ControllerUpdate<Lookup<any>, undefined>>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:839


onChange?

optional onChange?: OnChange<SpringValue<State>, Controller<State>, Item> | { [P in string | number | symbol]?: OnChange<SpringValue<State[P]>, Controller<State>, Item> }

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:857

Called once per frame when animations are active

Also accepts an object for per-key events


onPause?

optional onPause?: OnPause<SpringValue<State>, Controller<State>, Item> | { [P in string | number | symbol]?: OnPause<SpringValue<State[P]>, Controller<State>, Item> }

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:858


onProps?

optional onProps?: OnProps<State> | { [P in string | number | symbol]?: OnProps<State[P]> }

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:866

Called after an animation is updated by new props. Useful for manipulation

Also accepts an object for per-key events


onResolve?

optional onResolve?: OnResolve<SpringValue<State>, Controller<State>, Item>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:870

Called when the promise for this update is resolved.


onRest?

optional onRest?: OnRest<SpringValue<State>, Controller<State>, Item> | { [P in string | number | symbol]?: OnRest<SpringValue<State[P]>, Controller<State>, Item> }

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:851

Called when the # of animating values hits 0

Also accepts an object for per-key events


onResume?

optional onResume?: OnResume<SpringValue<State>, Controller<State>, Item> | { [P in string | number | symbol]?: OnResume<SpringValue<State[P]>, Controller<State>, Item> }

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:859


onStart?

optional onStart?: OnStart<SpringValue<State>, Controller<State>, Item> | { [P in string | number | symbol]?: OnStart<SpringValue<State[P]>, Controller<State>, Item> }

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:845

Called when the # of animating values exceeds 0

Also accepts an object for per-key events


pause?

optional pause?: MatchProp<State>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:904

Pause all animations by using true, or some animations by using a key or an array of keys.

Inherited from

AnimationProps.pause


ref?

optional ref?: SpringRef<State>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:837


reset?

optional reset?: MatchProp<State>

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:908

Start the next animations at their values in the from prop.

Inherited from

AnimationProps.reset


reverse?

optional reverse?: boolean

Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:912

Swap the to and from props.

Inherited from

AnimationProps.reverse

Released under the MPL-2.0 License.