FolioKit

Falling Text

A physics-based text animation component with Matter.js that makes text fall and interact with mouse movements

Installation

pnpm dlx shadcn@latest add https://folio-kit.vercel.app/r/falling-text.json
npx shadcn@latest add https://folio-kit.vercel.app/r/falling-text.json
yarn shadcn@latest add https://folio-kit.vercel.app/r/falling-text.json
bunx shadcn@latest add https://folio-kit.vercel.app/r/falling-text.json

Usage

import FallingText from "@/components/ui/falling-text";
<FallingText
  text="Hello World! This text will fall with physics"
  highlightWords={["Hello", "physics"]}
  trigger="auto"
/>

Examples

Default Falling Text

###Highlighted Falling text

###Physics Failling text

###Shadow text falling

Props

Prop

Type

API Reference

Matter.js Documentation

On this page