Layered Text

Layered text effect with offset shadows, customizable styling, and animations.

ScrollX UI
ScrollX UI
ScrollX UI
ScrollX UI

Installation

npx shadcn@latest add https://scrollxui.dev/registry/layered-text.json 

Usage

import { LayeredText } from "@/components/ui/layered-text";
<LayeredText
  text="ScrollX UI"
  className="text-4xl md:text-6xl font-bold text-black dark:text-white [--stroke-color:#FFFFFF] dark:[--stroke-color:#000000]"
  layers={["#06B6D4", "#14B8A6", "#84CC16"]}
  offsetX={2}
  offsetY={2}
  strokeWidth={2}
  animate={true}
/>

API Reference

Layered Text

Layered text effect with offset shadows, customizable styling, and animations.

Props

PropertyTypeDefaultDescription
textstringrequired
Main text to be displayed in layered style.
layersstring[]required
Array of colors used to create layered depth effects.
offsetXnumber6
Horizontal offset applied between each text layer.
offsetYnumber6
Vertical offset applied between each text layer.
strokeWidthnumber4
Width of the text stroke for the top visible layer.
animatebooleantrue
Whether to apply fade-in animation on text layers.
animationDurationnumber0.6
Duration (in seconds) of the fade-in animation.
classNamestring-
Optional className for additional styling.

Built withby Ahdeetai.