Skip to content

Text Cast Shadow

Pro

Long shadows fall from the letters across the page, cast by the pointer as a light or by a set sun angle.

  • React 19
  • Tailwind CSS 4

Added Nov 15, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Text Cast Shadow needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
33
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Put the heading in the Content part and the Canvas after it.

golden-heading.tsx

TextCastShadow

<span>
PropTypeDefaultDescription
childrenReactNode—A string, or the parts TextCastShadowContent and TextCastShadowCanvas.
anglenumber45The direction the shadow falls with no mouse, in degrees clockwise from the right: 0 right, 90 down. Default 45 (a sun at the top left).
lengthnumber0.6The longest shadow, in em of the text. Default 0.6. The canvas reaches this far around it.
followbooleantrueTrue (default): a mouse anywhere on the page is the light, and a closer light throws a longer shadow. Arrow keys turn the light from the keyboard. False: a fixed sun at angle.
localestring—The BCP 47 locale of the text, for the case of text-transform on the canvas. Default: the DisplayLocaleProvider locale, else "en-US".
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

TextCastShadowContent

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

TextCastShadowCanvas

<canvas>
PropTypeDefaultDescription
...props<canvas> attributes—Every other attribute goes to the <canvas>, with a ref.
  • Use follow to let the pointer move the light.
  • Set angle and length for a fixed sun.
ArrowLeft / ArrowUpTurns the light 15° back.
ArrowRight / ArrowDownTurns the light 15° on.
HomePuts the light back at angle.
  1. AddedText Cast Shadow.
Open the release