Baktiyar Ablaikhan

Background Lines

Source
Aceternity UI ↗
Author
Aceternity UI
Licence
Aceternity UI licence (free component)

Loading…

Coloured strokes race along wavy SVG lines behind the headline.

Code

"use client";
import React from "react";
import { BackgroundLines } from "@/lab/aceternity/ui/background-lines";

export default function BackgroundLinesDemo() {
  return (
    <div className="h-full w-full overflow-hidden [container-type:inline-size]">
      <BackgroundLines className="flex items-center justify-center w-full h-full md:h-full flex-col px-4">
        <h2 className="bg-clip-text text-transparent text-center bg-gradient-to-b from-neutral-900 to-neutral-700 dark:from-neutral-600 dark:to-white text-[clamp(1.25rem,6.5cqw,4.5rem)] leading-tight font-sans py-[2cqw] relative z-20 font-bold tracking-tight">
          Sanjana Airlines, <br /> Sajana Textiles.
        </h2>
        <p className="max-w-xl mx-auto text-[clamp(0.7rem,1.8cqw,1.125rem)] text-neutral-700 dark:text-neutral-400 text-center relative z-20">
          Get the best advices from our experts, including expert artists, painters, marathon
          enthusiasts and RDX, totally free.
        </p>
      </BackgroundLines>
    </div>
  );
}
Prompt

Build "Background Lines", a background animation. What it does: Coloured strokes race along wavy SVG lines behind the headline. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS, using motion. Technique: the Motion library. It sits on a dark background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://ui.aceternity.com/components/background-lines (Aceternity UI, Aceternity UI licence (free component)).