Skip to content

Gravity Type

A giant word made of rigid bodies. When it scrolls into view the letters drop in and pile up. Grab one and fling it, or sweep your cursor fast to kick them around; they squash when they land hard and throw longer shadows as they rise. Double-click to drop the word again.

Matter.js physicsDrag and flingTouch friendly60fpsReduced-motion safe
inReact
Grab and fling a letterDouble-click to drop again

Tweak

LIVE

Type

800

Colour

#ff4d00
#0a0a0a
#f2f0eb
2
#2b5cff

Physics

1.25
0.12

Shadows

Letters cast soft shadows

Props

9 props
  • textstring
    The word to drop. Uses the component's font; exposed to screen readers.default "inReact"
  • colorstring
    Default letter colour.default "#0a0a0a"
  • colorsstring[]
    Per-letter colours by index; the rest use color.default ["#f2f0eb", "#f2f0eb"]
  • grabColorstring
    Colour of a letter while you hold it.default "#2b5cff"
  • weightnumber
    Font weight.default 800
  • gravitynumber
    Gravity strength.default 1.25
  • bouncenumber
    How bouncy the letters are, 0 to 1.default 0.12
  • shadowsboolean
    Soft shadows under the letters.default true
  • classNamestring
    Give it a height, e.g. h-[420px].