Account

Originals

Creative

Gravity Text

Each letter drops under gravity, bounces on an invisible floor with a little spin and rests at an angle, then they climb back into the word. For 404 pages, empty states and playful headings.

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add gravity-text

Usage

Example
import { GravityText } from "@/components/galactrex/gravity-text";

<GravityText as="h1" text="Page not found" trigger="click" />

Source

Installs to components/galactrex/gravity-text.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
textstring—The text.
asElementType"span"Element to render.
trigger"click" | "hover" | "manual""click"What lets the letters fall.
fallenboolean—Fall when true, for trigger="manual".
dropnumber140How far below the text the floor is.
bouncenumber0.42Floor bounciness, 0 to 0.8.
restnumber1600Ms on the floor before climbing back; 0 stays down.
classNamestring—Extra classes for the outer element.

Variants

  • 404. The page title falls on arrival with `trigger="manual"`.
  • Hover gag. Letters tumble when the pointer arrives.

Accessibility

  • Clickable version is a button with Enter and Space.
  • The real text is read once; falling letters are aria-hidden.

Motion and reduced motion

  • A tiny physics step per frame writes transforms straight to the letters; stops when everything rests.
  • Reduced motion: letters stay put.