Skip to content

    Browse components

    Fancy Text

    Outlined letters that lift and fill with a sweeping gradient, one after another, on hover.

    Open
    Customize

    Installation

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

    Usage

    import { FancyText } from "@/components/ui/fancy-text";
    
    <FancyText text="Hover to fill" colors={["#a3e635", "#22d3ee", "#a78bfa"]} />

    Props

    PropTypeDefaultDescription
    textstring"Hover to fill"Text to render.
    colorsstring[]["#a3e635","#22d3ee","#a78bfa"]Gradient stops for the filled state.
    strokeWidthnumber1.5Outline width, in px.
    liftnumber0.08How far each letter rises on hover, in em.
    staggernumber40Delay between letters, in ms.
    durationnumber600Duration of each letter's sweep, in ms.
    activebooleanfalseKeep the filled state on, e.g. to drive it from a parent.
    strokeColorstring—Outline color in the resting state. Defaults to a faint foreground.
    classNamestring—Extra classes for the root element.