Skip to content

SqueezeAndPop

The SqueezeAndPop text effect sequences a cartoon-style entrance simulation: text units drop from above, squash horizontally and vertically upon hitting the baseline, stretch vertically during rebound, and settle to their final coordinates.


Basic Character Bounce

The yOffset option determines the starting drop height in pixels. The bounceHeight parameter defines the peak vertical height of the rebound.

CARTOONISH

60 FPS

High Drop and Heavy Elastic Squash

Configuring a higher vertical offset coordinates an exaggerated impact deformation profile, driven by smaller squashY and higher stretchY factors.

EXAGGERATED

60 FPS

Word-Level Squeeze and Pop

Setting the type parameter to 'words' drops and squashes entire words together as coordinated units.

BOUNCING COMPLETE WORDS

60 FPS

In-Place Squash and Pop

Setting yOffset: 0 and bounceHeight: 0 disables dropping translation, executing squash-and-stretch deformation directly at the default layout positions.

IN-PLACE SQUEEZE

60 FPS

Slow-Motion Physics Loop

Running the sequence within an infinite loop at a reduced timeline speed (via .timeScale) highlights the multi-phase deformation timing.

SLOW MOTION

60 FPS

API Reference

javascript
import { squeezeAndPop } from 'animx/plugins/Text'

const tl = squeezeAndPop(target, config)

Configuration Options

OptionDefaultDescription
type'chars'Slicing layout unit: 'chars', 'words', or 'lines'.
yOffset-100Starting height offset of the initial drop in pixels.
squashY0.5Minimum vertical scale factor during impact squash.
squashX1.3Maximum horizontal scale factor during impact squash.
stretchY1.2Maximum vertical scale factor during bounce stretch.
stretchX0.8Minimum horizontal scale factor during bounce stretch.
bounceHeight-15Peak height of the rebound bounce in pixels.
fadetrueInterpolates opacity from 0 to 1 during drop phase.
stagger0.06Delay offset between subsequent drop starts in seconds.
revertOnCompletefalseResets layout and removes absolute spans on complete.
pausedfalseStandard playback initialization lock flag.