Skip to content

API Reference / @gtkx/animated / InterpolatorConfig

Type Alias: InterpolatorConfig<Output>

InterpolatorConfig<Output> = object

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:72

Type Parameters

Output

Output = Animatable

Properties

easing?

optional easing?: EasingFunction

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:125

Custom easing to apply in interpolator.


extrapolate?

optional extrapolate?: ExtrapolateType

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:103

What happens when the spring exceeds its target value. Shortcut to set extrapolateLeft and extrapolateRight.

  • extend continues the interpolation past the target value
  • clamp limits the interpolation at the max value
  • identity sets the value to the interpolation input as soon as it hits the boundary

Default

ts
'extend'

extrapolateLeft?

optional extrapolateLeft?: ExtrapolateType

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:82

What happens when the spring goes below its target value.

  • extend continues the interpolation past the target value
  • clamp limits the interpolation at the max value
  • identity sets the value to the interpolation input as soon as it hits the boundary

Default

ts
'extend'

extrapolateRight?

optional extrapolateRight?: ExtrapolateType

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:92

What happens when the spring exceeds its target value.

  • extend continues the interpolation past the target value
  • clamp limits the interpolation at the max value
  • identity sets the value to the interpolation input as soon as it hits the boundary

Default

ts
'extend'

map?

optional map?: (value) => number

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:121

Transformation to apply to the value before interpolation.

Parameters

value

number

Returns

number


output

output: readonly Constrain<Output, Animatable>[]

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:117

Output values from the interpolation function. Should match the length of the range array.


range?

optional range?: readonly number[]

Defined in: node_modules/.pnpm/@react-spring+types@10.1.2/node_modules/@react-spring/types/dist/react-spring_types.modern.d.mts:113

Input ranges mapping the interpolation to the output values.

Example

ts
range: [0, 0.5, 1], output: ['yellow', 'orange', 'red']

Default

ts
[0,1]

Released under the MPL-2.0 License.