CTA panel

The closing call to action: a soft panel with the glow in one corner.

Start capturing in minutes. 200 free screenshots every month.

Install

$ npx shadcn@latest add @nudgekit/cta-panel

Or with no config: npx shadcn@latest add https://ui.nudgekit.app/r/cta-panel.json

Brings in @nudgekit/button, @nudgekit/tone, @nudgekit/glow, and the theme.

Usage

usage.tsx
import { CtaPanel } from "@/components/cta-panel"

<CtaPanel
  title="Start capturing in minutes."
  tone="200 free screenshots every month."
  primary={{ label: "Get your API key", href: "/signup" }}
/>

Do

  • Use once, at the end of the page, before the footer.

Don't

  • Use more than one CTA panel on a page.

Code

What the CLI writes into your project. It is yours to change.

components/cta-panel.tsx
import * as React from "react";
import { ArrowRight } from "lucide-react";

import { cn } from "@/lib/utils";
import { buttonVariants } from "@/components/ui/button";
import { Tone } from "@/components/ui/tone";
import { Glow } from "@/components/glow";

export interface CtaPanelProps {
  title: string;
  tone?: string;
  primary: { label: string; href: string };
  secondary?: { label: string; href: string };
  className?: string;
}

/** The closing call to action: a soft rounded panel with the glow in one corner. */
function CtaPanel({ title, tone, primary, secondary, className }: CtaPanelProps) {
  return (
    <section data-slot="cta-panel" className={cn("mx-auto max-w-[1120px] px-6 pb-20", className)}>
      <div className="relative isolate overflow-hidden rounded-3xl border border-border bg-surface px-7 py-10 md:px-14 md:py-16">
        <Glow className="-z-10 [&>div:first-child]:-right-[220px] [&>div:first-child]:-top-[220px] [&>div:first-child]:opacity-60" />
        <h2 className="headline mb-7 max-w-[640px] text-[clamp(1.5rem,2.6vw,1.75rem)] leading-[1.18]">
          {title} {tone && <Tone>{tone}</Tone>}
        </h2>
        <div className="flex flex-wrap gap-3">
          <a href={primary.href} className={buttonVariants()}>
            {primary.label}
            <ArrowRight aria-hidden className="size-4 transition-transform duration-150 group-hover:translate-x-0.5 motion-reduce:transition-none" />
          </a>
          {secondary && (
            <a href={secondary.href} className={buttonVariants({ variant: "secondary" })}>
              {secondary.label}
            </a>
          )}
        </div>
      </div>
    </section>
  );
}

export { CtaPanel };