Text Cube

Cursor-following 3D text cube with depth fade

text-cube-tw

Customize

Cube

200
20
500
0.3
1

Animation

1
0.08
0.3
0.3
0.1
2

Text

16
100
0
0

Color

Props

NameTypeDefaultDescription
widthstring | number"100%"Container width
heightstring | number"100%"Container height
classNamestring""Additional CSS classes
childrenReactNodeundefinedContent rendered above the effect
wordstring"x"The word rendered on each face
cubeSizenumber200Cube edge length in pixels (50–500)
rotationSpeednumber1Rotation speed multiplier (0–5)
followSpeednumber0.08How quickly the cube follows the cursor (0–1)
densitynumber20Number of text duplicates per face (1–50)
fontSizenumber16Base font size in pixels (8–72)
fontWeightnumber100Font weight (100–900)
fontFamilystring"'Inter', sans-serif"Font family
colorstring"#1a1a1a"Text color (hex)
backgroundColorstring"#ffffff"Background color (hex)
offsetXnumber0Horizontal offset from cursor in pixels (-200–200)
offsetYnumber0Vertical offset from cursor in pixels (-200–200)
breathenumber0.1Breathing animation amplitude (0–1)
breatheSpeednumber2Breathing animation speed (0–10)
depthFadenumber0.3Tail opacity at furthest face (0–1)
perspectivenumber500Perspective distance in pixels (100–2000)
autoRotateXnumber0.3Auto-rotate on X axis when idle (0–3)
autoRotateYnumber0.3Auto-rotate on Y axis when idle (0–3)
opacitynumber1Master opacity (0–1)