Baktiyar Ablaikhan

Spotlight New

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

Loading…

Two soft, layered light cones drift back and forth from the top corners.

Code

"use client";
import React from "react";
import { Spotlight } from "@/lab/aceternity/ui/spotlight-new";

export default function SpotlightNewDemo() {
  return (
    <div className="@container relative flex h-full w-full items-center justify-center overflow-hidden bg-black/[0.96] antialiased">
      <Spotlight />
      <div className="relative z-10 mx-auto w-full max-w-7xl p-4">
        <h1 className="bg-opacity-50 bg-gradient-to-b from-neutral-50 to-neutral-400 bg-clip-text text-center text-[clamp(1.5rem,7cqw,4.5rem)] leading-tight font-bold text-transparent">
          Spotlight <br /> which is not overused.
        </h1>
        <p className="mx-auto mt-[2cqw] max-w-[70cqw] text-center text-[clamp(0.65rem,1.8cqw,1rem)] font-normal text-neutral-300">
          A subtle yet effective spotlight effect, because the previous version is used a bit too much
          these days.
        </p>
      </div>
    </div>
  );
}
Prompt

Build "Spotlight New", a background animation. What it does: Two soft, layered light cones drift back and forth from the top corners. 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/spotlight-new (Aceternity UI, Aceternity UI licence (free component)).