148
An email capture that checks as you go, catches gmial-style typos, shakes once on a bad address, then morphs into a success note while your avatar joins the stack and the reader count rolls up by one.
akanewsletter·email capture·subscribe
Run this in any project set up for the shadcn CLI. It copies the Newsletter CTA source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/newsletter-cta.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { NewsletterCta } from "@/components/newsletter-cta";
export default function Page() {
return <NewsletterCta />;
}A free React block in the Marketing collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Newsletter CTA source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| eyebrow | string | — |
| titlerequired | ReactNode | — |
| description | ReactNode | — |
| subscribersrequired | number | — |
| readers | string[] | [] |
| issues | NewsletterIssue[] | [] |
| note | string | "No spam. One click to unsubscribe." |
| onSubscribe | (email: string) => Promise<void> | void | — |
| className | string | — |