Skip to content
PixiKit

Word Drop

A sentence that falls apart: its words or letters drop with gravity, spin, bounce and pile up on the floor, where they can be dragged, thrown and knocked around with the pointer, then fly back into place.

pixikit.com/docs/effects/word-drop

Customize

Trigger
Variant
Split
Order
Stagger0.03s
Gravity1.00
Bounciness0.20
Scatter0.50
Draggable
Mouse constraint stiffness0.20
Cursor push0.50
Restore delay2.0s
Accent color
Theme
Background color
Wireframes

Props

22
NameTypeDefaultDescription
textstring""The text that falls apart.
highlightWordsstring[][]Words that start with any of these strings get the accent colour, or the accent tile in the tiles variant.
highlightClassstring"highlighted"An extra class added to highlighted words.
trigger"auto" | "hover" | "click" | "scroll""auto"What starts the fall. Scroll starts it when the text scrolls into view.
variant"text" | "tiles""text"Plain falling text, or words on tiles that stack like blocks.
split"words" | "letters""words"Whether whole words or single letters fall.
order"random" | "sequence" | "center" | "together""random"Which pieces drop first. Falling pieces knock loose the ones they land on.
staggernumber0.03The delay between pieces dropping, in seconds.
gravitynumber1The strength of gravity. Negative values fall upward.
bouncinessnumber0.2How much pieces bounce when they land, 0 to 1.
scatternumber0.5How much spin and sideways push each piece gets as it drops, 0 to 1.
draggablebooleantrueLets people pick up, drag and throw pieces.
mouseConstraintStiffnessnumber0.2How tightly a dragged piece follows the pointer, 0 to 1.
cursorPushnumber0.5How hard a quick swipe knocks the fallen pieces around. 0 turns it off.
restoreDelaynumber0Seconds after the pile settles, with the pointer away, before the text flies back into place and can fall again. 0 keeps it fallen.
fontSizestring"1rem"The font size of the text.
accentColorstring"#5b8cff"The colour of highlighted words, or of their tiles in the tiles variant.
theme"dark" | "light""dark"The colour theme of the tiles.
backgroundColorstring"transparent"The background of the area the text falls into.
wireframesbooleanfalseOutlines each piece to show its physics shape.
classNamestringNone
styleCSSPropertiesNone

Related