Falling Text

Text Effects

Matter.js-powered word physics text where words break apart, fall, bounce, and can be dragged with the mouse.

Loading preview...
Customize
Trigger:
Text
Gravity
0.7
Mouse Stiffness
0.9
Font Size
Wireframes
Background

Props

PropTypeDefaultDescription
textstring''Sentence rendered and converted into physical word bodies.
highlightWordsstring[][]Words (prefix matching) to highlight before the physics starts.
highlightClassNamestring'text-ignite font-semibold'Tailwind classes used for highlighted words.
trigger'auto' | 'scroll' | 'click' | 'hover''auto'How the effect starts.
backgroundColorstring'transparent'Matter renderer background color.
wireframesbooleanfalseRender Matter.js wireframes for debugging.
gravitynumber1Vertical gravity strength.
mouseConstraintStiffnessnumber0.2Drag stiffness when grabbing words.
fontSizestring'1rem'Font size of the text before split.
classNamestring''Additional classes for the outer container.