Skip to content

    Browse components

    Slide Text

    On hover every letter rolls out of view and a fresh copy slides in behind it, in a staggered wave.

    Open
    Customize

    up
    down
    start
    center
    end

    Installation

    npx shadcn@latest add @glint-ui/slide-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/slide-text.json

    Usage

    import { SlideText } from "@/components/ui/slide-text";
    
    <a href="/contact"><SlideText text="Let's talk" hoverColor="#a3e635" /></a>

    Props

    PropTypeDefaultDescription
    textstring"Let's talk"Text to render.
    hoverColorstring"#a3e635"Color of the incoming letters.
    direction"up" | "down""up"Direction the letters travel.
    from"start" | "center" | "end""start"Where the stagger starts.
    staggernumber25Delay between letters, in ms.
    durationnumber500Slide duration of each letter, in ms.
    activebooleanfalseKeep the swapped state, e.g. for an active link.
    classNamestring—Extra classes for the root element.