# CTA Banner

> Large rounded call-to-action panel on a faded dot grid with a headline, two buttons and a soft volt spotlight that trails the cursor.

A shadcn/ui block from the [@geturui](https://geturui.com/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/geturui/cta-banner).

- Page, with a live preview: https://shadcn.exchange/r/geturui/cta-banner
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/geturui/cta-banner-light-e0fb8f9a5620f84f.png
- Registry item: https://geturui.com/r/cta-banner.json
- Categories: blocks, cta, banner, spotlight, dot grid, landing, conversion
- Listed: 2026-10-23, source last changed 2026-10-23

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/geturui/cta-banner.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`, `motion`
- Registry items: `@geturui/badge`, `@geturui/button`

## Files

### `registry/geturui/blocks/cta-banner.tsx`

```tsx
"use client";

import * as React from "react";
import { motion, useMotionTemplate, useMotionValue, useReducedMotion, useSpring } from "motion/react";
import { ArrowRight } from "lucide-react";
import { cn } from "@/lib/utils";
import { Badge } from "@/components/ui/badge";
import { Button, buttonClasses, type ButtonVariant } from "@/components/ui/button";

export interface CtaAction {
  label: string;
  /** Renders an anchor when set, otherwise a button. */
  href?: string;
  onClick?: () => void;
}

export interface CtaBannerProps {
  /** Small badge above the headline. Pass null to hide. */
  eyebrow?: string | null;
  headline?: string;
  subcopy?: string;
  primaryAction?: CtaAction;
  secondaryAction?: CtaAction | null;
  /** Radial glow that follows the pointer. Off under reduced motion. */
  spotlight?: boolean;
  /** "center" or "left" aligned copy; left puts the buttons on the right on large screens. */
  align?: "center" | "left";
  className?: string;
}

function Action({ action, variant }: { action: CtaAction; variant: ButtonVariant }) {
  const primary = variant === "primary";
  if (action.href) {
    return (
      <a href={action.href} onClick={action.onClick} className={buttonClasses({ variant, size: "lg" })}>
        <span className="inline-flex items-center gap-[inherit]">
          {action.label}
          {primary && <ArrowRight aria-hidden className="size-4 transition-transform duration-300 ease-[var(--ease-spring)] group-hover/btn:translate-x-[3px]" />}
        </span>
      </a>
    );
  }
  return (
    <Button size="lg" variant={variant} trailing={primary ? "arrow" : undefined} onClick={action.onClick}>
      {action.label}
    </Button>
  );
}

/** Large rounded call-to-action panel on a dot grid, with a soft spotlight that trails the cursor. */
export function CtaBanner({
  eyebrow = "Free to start",
  headline = "Ship your next launch page this afternoon",
  subcopy = "Pick a hero, a pricing table and an FAQ. Paste them in, swap the copy, and you are live.",
  primaryAction = { label: "Get started free" },
  secondaryAction = { label: "Talk to sales" },
  spotlight = true,
  align = "center",
  className,
}: CtaBannerProps) {
  const reduce = useReducedMotion() ?? false;
  const ref = React.useRef<HTMLDivElement>(null);
  const mx = useMotionValue(50);
  const my = useMotionValue(30);
  const x = useSpring(mx, { stiffness: 180, damping: 26 });
  const y = useSpring(my, { stiffness: 180, damping: 26 });
  const glow = useMotionValue(0.55);
  const glowSpring = useSpring(glow, { stiffness: 200, damping: 30 });
  const background = useMotionTemplate`radial-gradient(520px circle at ${x}% ${y}%, var(--volt-soft), transparent 70%)`;
  const live = spotlight && !reduce;
  const left = align === "left";

  function onMove(e: React.PointerEvent) {
    if (!live) return;
    const r = ref.current?.getBoundingClientRect();
    if (!r) return;
    mx.set(((e.clientX - r.left) / r.width) * 100);
    my.set(((e.clientY - r.top) / r.height) * 100);
    glow.set(1);
  }

  return (
    <section className={cn("@container w-full px-4 py-12 sm:px-6 sm:py-16", className)}>
      <div
        ref={ref}
        onPointerMove={onMove}
        onPointerLeave={() => {
          glow.set(0.55);
          mx.set(50);
          my.set(30);
        }}
        className="relative isolate mx-auto max-w-6xl overflow-hidden rounded-xl border border-border bg-surface"
      >
        <div
          aria-hidden
          className="dot-grid absolute inset-0 -z-20 [mask-image:radial-gradient(ellipse_at_center,#000_30%,transparent_80%)]"
        />
        {spotlight && (
          <motion.div aria-hidden className="pointer-events-none absolute inset-0 -z-10" style={{ background, opacity: glowSpring }} />
        )}
        <div aria-hidden className="pointer-events-none absolute inset-x-0 top-0 -z-10 h-px bg-gradient-to-r from-transparent via-volt-ink/50 to-transparent" />

        <div
          className={cn(
            "flex flex-col gap-8 px-6 py-14 @xl:px-12 @xl:py-20",
            left ? "items-start @4xl:flex-row @4xl:items-end @4xl:justify-between" : "items-center text-center",
          )}
        >
          <div className={cn("grid gap-4", left ? "max-w-2xl" : "max-w-3xl justify-items-center")}>
            {eyebrow && (
              <Badge tone="new" pulse>
                {eyebrow}
              </Badge>
            )}
            <motion.h2
              className="text-balance font-display text-[34px] font-semibold leading-[1.08] tracking-[-1px] text-ink @xl:text-5xl @xl:tracking-[-1.6px]"
              initial={reduce ? { opacity: 0 } : { opacity: 0, y: 14, filter: "blur(8px)" }}
              whileInView={{ opacity: 1, y: 0, filter: "blur(0px)" }}
              viewport={{ once: true }}
              transition={{ duration: 0.6, ease: [0.22, 1, 0.36, 1] }}
            >
              {headline}
            </motion.h2>
            {subcopy && (
              <motion.p
                className="text-balance text-base leading-7 text-ink-muted @xl:text-lg"
                initial={{ opacity: 0 }}
                whileInView={{ opacity: 1 }}
                viewport={{ once: true }}
                transition={{ duration: 0.5, delay: 0.15 }}
              >
                {subcopy}
              </motion.p>
            )}
          </div>
          <motion.div
            className="flex flex-wrap items-center gap-3"
            initial={reduce ? { opacity: 0 } : { opacity: 0, y: 10 }}
            whileInView={{ opacity: 1, y: 0 }}
            viewport={{ once: true }}
            transition={{ type: "spring", stiffness: 300, damping: 30, delay: 0.25 }}
          >
            <Action action={primaryAction} variant="primary" />
            {secondaryAction && <Action action={secondaryAction} variant="secondary" />}
          </motion.div>
        </div>
      </div>
    </section>
  );
}
```

### `LICENSE-geturui.md`

```md
MIT License

Copyright (c) 2026 geturui.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
