Skip to content

API Reference / @gtkx/animated / SpringRef

Interface: 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:982

Type Parameters

State

State extends Lookup = Lookup

SpringRef(props?): AsyncResult<Controller<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:983

Parameters

props?

ControllerUpdate<State, undefined> | ControllerUpdateFn<State>

Returns

AsyncResult<Controller<State>>[]

Properties

current

current: Controller<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:984

Methods

_getProps()

_getProps(arg, ctrl, index): Falsy | ControllerUpdate<State, 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:1031

Parameters

arg

ControllerUpdate<State, undefined> | ControllerUpdateFn<State>

ctrl

Controller<State>

index

number

Returns

Falsy | ControllerUpdate<State, undefined>


add()

add(ctrl): void

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:986

Add a controller to this ref

Parameters

ctrl

Controller<State>

Returns

void


delete()

delete(ctrl): void

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:988

Remove a controller from this ref

Parameters

ctrl

Controller<State>

Returns

void


pause()

Call Signature

pause(): this

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:990

Pause all animations.

Returns

this

Call Signature

pause(keys): this

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:992

Pause animations for the given keys.

Parameters
keys

OneOrMore<string>

Returns

this

Call Signature

pause(keys?): this

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:994

Pause some or all animations.

Parameters
keys?

OneOrMore<string>

Returns

this


resume()

Call Signature

resume(): this

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:996

Resume all animations.

Returns

this

Call Signature

resume(keys): this

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:998

Resume animations for the given keys.

Parameters
keys

OneOrMore<string>

Returns

this

Call Signature

resume(keys?): this

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:1000

Resume some or all animations.

Parameters
keys?

OneOrMore<string>

Returns

this


set()

Call Signature

set(values): void

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:1002

Update the state of each controller without animating.

Parameters
values

Partial<State>

Returns

void

Call Signature

set(values): void

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:1004

Update the state of each controller without animating based on their passed state.

Parameters
values

(index, ctrl) => Partial<State>

Returns

void


start()

Call Signature

start(): AsyncResult<Controller<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:1006

Start the queued animations of each controller.

Returns

AsyncResult<Controller<State>>[]

Call Signature

start(props): AsyncResult<Controller<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:1008

Update every controller with the same props.

Parameters
props

ControllerUpdate<State>

Returns

AsyncResult<Controller<State>>[]

Call Signature

start(props): AsyncResult<Controller<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:1010

Update controllers based on their state.

Parameters
props

ControllerUpdateFn<State>

Returns

AsyncResult<Controller<State>>[]

Call Signature

start(props?): AsyncResult<Controller<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:1012

Start animating each controller.

Parameters
props?

ControllerUpdate<State, undefined> | ControllerUpdateFn<State>

Returns

AsyncResult<Controller<State>>[]


stop()

Call Signature

stop(): this

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:1014

Stop all animations.

Returns

this

Call Signature

stop(keys): this

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:1016

Stop animations for the given keys.

Parameters
keys

OneOrMore<string>

Returns

this

Call Signature

stop(cancel): this

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:1018

Cancel all animations.

Parameters
cancel

boolean

Returns

this

Call Signature

stop(cancel, keys): this

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:1020

Cancel animations for the given keys.

Parameters
cancel

boolean

keys

OneOrMore<string>

Returns

this

Call Signature

stop(keys?): this

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:1022

Stop some or all animations.

Parameters
keys?

OneOrMore<string>

Returns

this

Call Signature

stop(cancel, keys?): this

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:1024

Cancel some or all animations.

Parameters
cancel

boolean

keys?

OneOrMore<string>

Returns

this


update()

Call Signature

update(props): this

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:1026

Add the same props to each controller's update queue.

Parameters
props

ControllerUpdate<State>

Returns

this

Call Signature

update(props): this

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:1028

Generate separate props for each controller's update queue.

Parameters
props

ControllerUpdateFn<State>

Returns

this

Call Signature

update(props): this

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:1030

Add props to each controller's update queue.

Parameters
props

ControllerUpdate<State, undefined> | ControllerUpdateFn<State>

Returns

this

Released under the MPL-2.0 License.