Skip to content

Cta Newsletter

Newsletter CTA on a mint block: a flat envelope made of shapes with a notification badge, headline, pill email form and a cheerful success state.

soft-flat/section/cta-newsletter
Open ↗

Source

"use client";

import { useId, useState, type FormEvent } from "react";
import { cn } from "@/lib/utils";

export interface CtaNewsletterProps {
  title?: string;
  description?: string;
  onSubscribe?: (email: string) => void | Promise<void>;
  className?: string;
}

/** Newsletter CTA on a mint block: envelope illustration made of shapes, headline, rounded input + button and a cheerful success message. */
export function CtaNewsletter({
  title = "One calm email a month",
  description = "Planning tips, new templates and what we shipped. No spam, unsubscribe any time.",
  onSubscribe,
  className,
}: CtaNewsletterProps) {
  const id = useId();
  const [done, setDone] = useState(false);
  const submit = async (e: FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    await onSubscribe?.(String(new FormData(e.currentTarget).get("email")));
    setDone(true);
  };
  return (
    <section className={cn("da-section bg-da-bg text-da-fg", className)}>
      <div className="da-container">
        <div className="mx-auto flex max-w-4xl flex-col items-center gap-8 rounded-[40px] bg-da-secondary p-8 text-da-secondary-fg sm:p-12 md:flex-row">
          <div aria-hidden className="relative h-28 w-36 shrink-0">
            <div className="absolute inset-0 rounded-da-md bg-da-surface" />
            <div className="absolute inset-x-0 top-0 h-16 [clip-path:polygon(0_0,100%_0,50%_100%)] bg-da-warning" />
            <span className="absolute -top-3 -right-3 grid size-9 place-items-center rounded-full bg-da-danger font-da-display text-sm font-extrabold text-da-danger-fg">
              1
            </span>
          </div>
          <div className="flex-1 text-center md:text-left">
            <h2 className="font-da-display text-3xl font-extrabold tracking-da-display">{title}</h2>
            <p className="mt-2 opacity-90">{description}</p>
            {done ? (
              <p role="status" className="mt-6 inline-block rounded-da-pill bg-da-surface px-5 py-3 font-semibold text-da-fg">
                You’re in! See you next month 💌
              </p>
            ) : (
              <form onSubmit={submit} className="mt-6 flex flex-col gap-2 sm:flex-row">
                <label htmlFor={id} className="sr-only">
                  Email
                </label>
                <input
                  id={id}
                  name="email"
                  type="email"
                  required
                  autoComplete="email"
                  placeholder="you@team.com"
                  className="da-focus h-12 min-w-0 sm:flex-1 rounded-da-pill bg-da-surface px-5 text-da-fg placeholder:text-da-muted-fg"
                />
                <button type="submit" className="da-focus da-transition h-12 rounded-da-pill bg-da-fg px-6 font-semibold text-da-bg hover:-translate-y-0.5">
                  Subscribe
                </button>
              </form>
            )}
          </div>
        </div>
      </div>
    </section>
  );
}

export default CtaNewsletter;

modules/soft-flat/section/cta-newsletter/index.tsx

Props

PropTypeDefaultDescription
title / descriptionstring—Copy.
onSubscribe(email: string) => void | Promise<void>—Handler.
classNamestring—Classes.

Other cta variants in Soft Flat

CTA in other art directions

CTA Banner

Full-bleed yellow slab with a giant uppercase headline and an inline email capture form (pending + success states), ruled pattern in the corner.

BrutalistCTA

CTA Countdown

Limited-offer CTA in an ink slab: uppercase offer headline, yellow claim button, dashed promo code, and a four-cell live countdown (days/hours/min/sec) with the first cell in yellow.

BrutalistCTA

CTA Split

Two-audience CTA: a big headline over two fully clickable cards (yellow for engineers, blue for product teams) with audience label, title, pitch and a button chip; cards slam into their shadow on hover.

BrutalistCTA

CTA Sticker

Full-bleed pink CTA with a giant centered uppercase headline, an oversized ink button that slams into its shadow on hover, and a yellow circular text-path sticker ticking around in steps.

BrutalistCTA

Cta App

App download CTA in a glass panel: headline, ink store buttons and rating on the left; an HTML phone mock-up recording an in-person meeting (mic orb, waveform, AI chip) rising from the bottom on the right.

GlassCTA

Cta Gradient

Bold full-gradient CTA card with a masked grid overlay and top glow, white primary button, translucent secondary button and three frosted stat chips.

GlassCTA

CTA Orb

Large frosted panel with a slowly spinning, heavily blurred conic-gradient orb glowing through the glass, centered headline, ink + frosted CTAs and a reassurance line.

GlassCTA

Cta Waitlist

Frosted CTA panel haloed by a blurred gradient ring: headline, copy, pill email form with gradient button (success state) and three check perks.

GlassCTA

Cta Banner

Compact inverted ink banner on a single row: title and one-liner on the left, solid and outline actions on the right, with a faint grid fading in from the right edge.

MinimalCTA

CTA Glow

Closing call-to-action card: centered headline and copy, ink button with keyboard hint, ghost secondary link, an indigo glow rising from the bottom edge and a gradient hairline on top.

MinimalCTA

Cta Newsletter

Centered email capture card with an indigo hairline on top: headline, copy, email field and ink button, with client validation plus pending, success and error states.

MinimalCTA

Cta Split

Wide two-column CTA card: headline, copy and two buttons on the left; a tinted panel on the right with a numbered ‘first 10 minutes’ onboarding checklist and time estimates.

MinimalCTA

Cta Contact

Studio-style contact CTA: mono label, headline, the email address set huge as a link, and a row of contact channels (studio, press, careers) in mono under a hairline.

Mono CleanCTA

Cta Email

Underline-input signup: large headline, then an email field drawn as a single bottom rule with an inline “Get started →” button; confirmation replaces the form.

Mono CleanCTA

Cta Giant

Full-width CTA as a giant link: the whole headline is the link, an arrow slides in on hover and an ink underline wipes across; a mono note sits below.

Mono CleanCTA

Cta Split

Two-door CTA: the section is split into two equal halves (white | ink) with a mono label and a large title each; hovering a half inverts it and nudges the arrow.

Mono CleanCTA

Cta Band

Full-width primary-blue band with a faint grid pattern, headline + subline on the left and inverted white + outlined buttons on the right.

Neo CorporateCTA

Cta Demo

Book-a-demo CTA: benefits list on the left, bordered form card (work email, company, team size select) on the right with an inline success state.

Neo CorporateCTA

Cta Stats

Split CTA on a dark (fg-colored) panel: copy + buttons on the left, a 2×2 grid of large outcome stats divided by hairlines on the right.

Neo CorporateCTA

Cta Trust

Centered CTA inside a bordered panel: headline, two buttons, a line of compliance assurances with shield icons, and a strip of customer wordmarks below a hairline.

Neo CorporateCTA

Cta Blob

Closing CTA inside a large sage organic blob (SVG shape scaled to the content) with a clay pebble and two leaves around it; serif headline and cream pill buttons.

Organic SoftCTA

Cta Journal

Newsletter CTA styled like a paper journal: clay-tinted card with serif title, recent issue list with mono numbers, and a rounded email + button form with a warm thank-you state.

Organic SoftCTA

Cta Pledge

Interactive pledge CTA: pick the commitments your team is ready for (round check cards), a counter of companies who pledged, and a CTA that reflects how many you chose.

Organic SoftCTA

Cta Wave

Full-width sage band with soft wavy top and bottom edges (SVG), centered serif headline with an italic word, and two pill buttons; flows naturally between cream sections.

Organic SoftCTA