Skip to content

    Browse components

    Layered Text

    Colored copies hide behind each letter and fan out in a springy cascade on hover, then stack back.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/layered-text

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/layered-text.json

    Usage

    import { LayeredText } from "@/components/ui/layered-text";
    
    <LayeredText text="STACKED" offset={6} angle={45} />

    Props

    PropTypeDefaultDescription
    textstring"STACKED"Text to render.
    colorsstring[]["#a3e635","#22d3ee","#818cf8","#f472b6"]One color per layer, nearest first.
    offsetnumber6Distance between layers when fanned out, in px.
    anglenumber45Fan-out direction in degrees (0 = right, 90 = down).
    staggernumber30Delay between letters, in ms.
    durationnumber700Transition duration, in ms.
    activebooleanfalseKeep the layers fanned out.
    classNamestring—Extra classes for the root element.