Falling Text(013)

Interactive 2D physics simulation where words fall with gravity, collisions, and drag.

ClickHover
Requires:matter-js

Installation

$npx kibo add falling-text

Usage

1import { FallingText } from "@/components/kibo/falling-text/component";
2
3export default function Example() {
4 return (
5 <FallingText />
6 );
7}

Props Reference

PropTypeDefaultDescription
textstring''The text content to display and animate.
highlightWordsstring[][]Controls the highlight words for the component animation.
trigger'auto' | 'scroll' | 'click' | 'hover''auto'Controls the trigger for the component animation.
backgroundColorstring'transparent'Controls the background color for the component animation.
wireframesbooleanfalseControls the wireframes for the component animation.
gravitynumber1Controls the gravity for the component animation.
mouseConstraintStiffnessnumber0.2Controls the mouse constraint stiffness for the component animation.
fontSizestring'1rem'Font size in pixels, rems, or fluid clamp notation.