Text Animations

Long Shadow

Text that casts a long shadow sweeping like a sundial through the hours.

Install

bun add motion clsx tailwind-merge

Then copy 2 files into your project:

  • components/registry/long-shadow/long-shadow.tsx
  • lib/utils.ts

Props

PropTypeDefaultDescription
shadowLengthnumber24Reach of the cast shadow (layer count).
sweepSpeednumber0.5How fast the sun arcs; 0 holds a fixed shadow.
angleStartnumber20Sundial start angle.
angleSweepnumber140Total arc the sun sweeps.
pingPongbooleantrueArc back and forth (off = full rotation).
fadenumber0.6How much the shadow dissolves along its length.
skewnumber0Italic lean of the cast shadow.
shadowColorstring (hex)"#2a1a3a"Color of the long shadow.

What It Demonstrates

Loop
An animation that repeats, a set number of times or infinitely.
Idle animation
Subtle motion that plays while an element is just sitting there, waiting to be interacted with.
Linear
Constant speed. Avoid for UI; reserve for spinners or marquees.

Related Components

Appears In