Skip to content

    Browse components

    Text Spotlight

    Dimmed text with a soft, gradient-lit spotlight that trails your cursor and drifts on its own when idle.

    Open
    Customize

    Installation

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

    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/text-spotlight.json

    Usage

    import { TextSpotlight } from "@/components/ui/text-spotlight";
    
    <TextSpotlight text="Great interfaces are felt before they are understood." radius={180} />

    Props

    PropTypeDefaultDescription
    textstring"Great interfaces are felt before they are understood. Move closer and the words light up."Text to render.
    radiusnumber180Spotlight radius, in px.
    dimnumber0.14Opacity of the unlit text, 0–1.
    fromstring"#a3e635"Lit gradient start color.
    tostring"#22d3ee"Lit gradient end color.
    smoothingnumber0.85Follow lag, 0 = instant, closer to 1 = floatier.
    autoPlaybooleantrueDrift the light on its own while the pointer is away.
    classNamestring—Extra classes for the root element.