Container Cover
- Source
- Aceternity UI ↗
- Author
- Aceternity UI
- Licence
- Aceternity UI licence (free component)
Loading…
Hovering the phrase shakes it and sends light beams and sparkles streaking past.
Code
"use client";
import React from "react";
import { Cover } from "@/lab/aceternity/ui/cover";
import { Fit } from "./_fit";
export default function CoverDemo() {
return (
<Fit width={760} height={300} max={1.4}>
<div className="flex h-full w-full items-center justify-center">
<h1 className="text-6xl font-semibold max-w-7xl mx-auto text-center relative z-20 py-6 bg-clip-text text-transparent bg-gradient-to-b from-neutral-800 via-neutral-700 to-neutral-700 dark:from-neutral-800 dark:via-white dark:to-white">
Build amazing websites <br /> at <Cover>warp speed</Cover>
</h1>
</div>
</Fit>
);
}
Prompt
Build "Container Cover", a text animation. What it does: Hovering the phrase shakes it and sends light beams and sparkles streaking past. 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/container-cover (Aceternity UI, Aceternity UI licence (free component)).