Appearance
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
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
Word-Level Squeeze and Pop
Setting the type parameter to 'words' drops and squashes entire words together as coordinated units.
BOUNCING COMPLETE WORDS
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
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
API Reference
javascript
import { squeezeAndPop } from 'animx/plugins/Text'
const tl = squeezeAndPop(target, config)Configuration Options
| Option | Default | Description |
|---|---|---|
type | 'chars' | Slicing layout unit: 'chars', 'words', or 'lines'. |
yOffset | -100 | Starting height offset of the initial drop in pixels. |
squashY | 0.5 | Minimum vertical scale factor during impact squash. |
squashX | 1.3 | Maximum horizontal scale factor during impact squash. |
stretchY | 1.2 | Maximum vertical scale factor during bounce stretch. |
stretchX | 0.8 | Minimum horizontal scale factor during bounce stretch. |
bounceHeight | -15 | Peak height of the rebound bounce in pixels. |
fade | true | Interpolates opacity from 0 to 1 during drop phase. |
stagger | 0.06 | Delay offset between subsequent drop starts in seconds. |
revertOnComplete | false | Resets layout and removes absolute spans on complete. |
paused | false | Standard playback initialization lock flag. |