Skip to content

Documentation / Bound / BoundsLayer

BoundsLayer<Animating>

ts
type BoundsLayer<Animating> = object & Layer<Animating>;

Defined in: ../../extensions/src/bound.ts:213

A layer used to enforce minimum and maximum bounds on an animation.

Type declaration

update()

ts
update: (bounds) => void | undefined;

Updates and overrides the previously set bounds, similar to how modifyTo works. A bound updated with this function will apply immediately rather than waiting for the animation to end before snapping the state to be within the bound.

Parameters

bounds

PartialFullBounds<PartialRecursiveAnimatable<Animating>>

Returns

void | undefined

Type Parameters

Animating

Animating extends UnknownAnimatable

See

setupBoundsLayer for how to create a BoundsLayer.