AtroUIAtroUI
DocsBlog
StarOwn the UI
  • Introduction
  • Installation
  • Host APIs
  • Registry
  • Theming
  • Brand kit
  • Identity kit
  • Launch workflow
  • Collections
  • Glossary
  • Compare
  • Changelog
  • Blog
  • Updates
  • ButtonCLI
  • CardCLI
  • Form SelectCLI
  • TextareaCLI
  • BreadcrumbsCLI
  • ProseCLI
  • Founder AvatarCLI
  • Theme ToggleCLI
  • Adaptive Theme SwitchCLI
  • Theme ProviderCLI
  • LogoCLI
  • Mockup FrameCLI
  • TimelineCLI
  • Fade InCLI
  • StaggerCLI
  • Scroll ProgressCLI
  • Site HeaderCLI
  • Site FooterCLI
  • Bold FooterCLI
  • HeroCLI
  • PrincipleCLI
  • WorkCLI
  • CraftsCLI
  • LabCLI
  • WhoCLI
  • PricingCLI
  • Feature GridCLI
  • Logo CloudCLI
  • FAQCLI
  • Contextual CTACLI
  • Exit IntentCLI
  • Contact FormHost API
  • Calendly EmbedCLI
  • Waitlist FormHost API
  • Newsletter FormHost API
  • JournalCLI
  • Social ShareCLI
  • ResourcesCLI
  • Before / AfterCLI
  • Case StudyCLI
  • AR PortfolioCLI
  • Made With EmbedCLI
  • Count UpCLI
  • Deadline CountdownCLI
  • CurrentlyCLI
  • Project ListCLI
  • Log PreviewCLI
  • ChangelogCLI
  • Command MenuCLI
  • RevealCLI
  • Theme Toggle IconCLI
  • Site Header NarrowCLI
  • Site Footer NarrowCLI
  • Social FloatCLI
  • Reading ShelfCLI
  • Personal HeroCLI
  • ResumeCLI
  • Local ClockCLI
  • Weather ChipCLI
  • Stack ListCLI
  • OG ExamplesCLI
  • OG Live PreviewCLI
  • OG WorkspaceHost API
  • Thumbnail PreviewCLI
  • Thumbnail WorkspaceHost API
  • Project PlannerCLI
  • Scope ChatHost API
  • Live DashboardCLI
  • Analytics ProviderCLI
  • JSON-LDCLI
  • Testimonial SchemaCLI

Loading

Block

CLI registryHost API

Hardened Next.js Contact Form with SMTP API

A secure, production-ready React contact form component for Next.js with a matching SMTP and Resend backend API route.

Preview → install → use

01

Preview

$npx shadcn@latest add @atroui/contact-form

Source lands in your repo. Setup: Installation · Registry catalog · Host APIs.

02

Usage

Pair with npx shadcn add @atroui/api-contact (or import handleContactPost from atroui/api/contact). Set SMTP_* / CONTACT_EMAIL_TO (see .env.example).

Ship a contact form without writing /api/contact from scratch

Most kits give you inputs. This block posts to your App Router route. The matching Host API validates JSON, ignores honeypot bots, caps body size, and sends mail through SMTP or Resend. AtroUI never holds the inbox credentials.

FAQ

Do I need the atroui npm package for the contact form UI?
No. npx shadcn add @atroui/contact-form copies the form. Add npm i atroui and @atroui/api-contact only when you want the hardened POST handler.
Does atroui.com send the email?
No. Mail leaves from the consumer app using CONTACT_EMAIL_TO plus SMTP_* or RESEND_API_KEY. Missing mail config returns 503, not a send on AtroUI keys.

Part of Next.js forms with Host APIs.

Related

  • Site Header
  • Site Footer
  • Bold Footer
  • Hero

Contact Form

PreviousExit IntentNextCalendly Embed