dqnamo

Animated Banner

CTAs 335

About

A reusable animated banner pattern built from a short muted video loop with a poster fallback, a gradient overlay that fades from a solid color on the text side to transparent over the image, an extra hover/focus depth overlay, and a compact content layer with a title, balanced subtitle, call to action, and a live DD:HH:MM:SS countdown. Fully prop-driven (video, poster, title, subtitle, CTA, deadline, overlay color) and dependency-free.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Animated Banner to your project and fits it to your theme.

Code

How Animated Banner is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { useState } from "react";
import { AnimatedBanner } from "@/components/ui/animated-banner";

export default function Default() {
  // Fix the countdown target once, starting at 16d 04h 47m 22s.
  const [deadline] = useState(
    () => new Date(Date.now() + (((16 * 24 + 4) * 60 + 47) * 60 + 22) * 1000),
  );

  return (
    <div className="flex min-h-screen w-full items-center justify-center bg-neutral-100 p-8">
      <div className="w-full max-w-2xl">
        <AnimatedBanner
          ctaLabel="Explore odds"
          deadline={deadline}
          href="#"
          posterSrc="https://cdn.21st.dev/assets/mirror/8b/8bff605e5d14065f55207c156fec990baef960c1511cec14d017898bdb63857f.jpg"
          subtitle="Live odds for the winner, golden boot, groups, and every match."
          title="World Cup 2026"
          videoSrc="https://cdn.21st.dev/assets/mirror/52/5235c63d93989b3d4c94c55d10c6d7e4df11bd462d9bc711535de3b1f8377f89.mp4"
        />
      </div>
    </div>
  );
}

More by dqnamo

View all
  • Agent Dock

    Agent Dock

    538
  • Scroll Fade List

    Scroll Fade List

    298
  • Model Selector Prompt

    Model Selector Prompt

    154
  • Game of Life Loader

    Game of Life Loader

    127
  • Animated Signature

    Animated Signature

    55
  • Iridescent Foil

    Iridescent Foil

    52
  • Dynamic Button

    Dynamic Button

    44
  • Scramble Text

    Scramble Text

    32

More in CTAs

View all
  • Call To Action

    Call To Action

    28
  • CTA 3

    CTA 3

    403
  • Button

    Button

    76
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    930
  • Call to action

    Call to action

    172
  • Hero

    Hero

    1.2K
  • Pricing Section

    Pricing Section

    173
  • Responsive Hero Banner

    Responsive Hero Banner

    2K