Skip to content

    Browse components

    Moving Lines

    Fine diagonal lines drift sideways while bright comets of light race along them. Canvas 2D.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/moving-lines

    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/moving-lines.json

    Usage

    import { MovingLines } from "@/components/ui/moving-lines";
    
    <div className="relative h-96">
      <MovingLines highlightColor="#67e8f9" />
    </div>

    Props

    PropTypeDefaultDescription
    colorstring"#71717a"Base line color.
    highlightColorstring"#67e8f9"Color of the traveling highlights.
    gapnumber26Px between lines.
    anglenumber35Line angle in degrees.
    speednumber1Drift speed multiplier.
    highlightsnumber2.5Highlights launched per second.
    classNamestring—Extra classes for the root element.