Skip to Content

Newsletter Form

Newsletter signup form with an email field in two styles: a filled input group with the button inside, or a footer line with an arrow button. Posts to a URL or Server Function and announces status text.

pnpm dlx shadcn add @01orbital/newsletter-form

Usage

import { NewsletterForm } from "@/components/forms/newsletter-form"

// The copy: change text here, not in the markup.
const COPY = {
  label: "Email address",
  placeholder: "you@example.com",
  cta: "Subscribe",
} as const

/** Newsletter Form: the email field with its button inside, at a readable width. */
export default function NewsletterFormDemo() {
  return (
    <NewsletterForm
      label={COPY.label}
      placeholder={COPY.placeholder}
      cta={COPY.cta}
      className="w-full max-w-md"
    />
  )
}

Examples

New

newsletter-form-letters

newsletter-form-letters

Letters

Email signup example showing the NewsletterForm in a literary layout, with a large serif headline and an inset email field.

pnpm dlx shadcn add @01orbital/newsletter-form-letters

New

newsletter-form-postcard

newsletter-form-postcard

Postcard

Newsletter signup example styled as a postcard: an inset border, compact copy and a pill-shaped email field using the NewsletterForm.

pnpm dlx shadcn add @01orbital/newsletter-form-postcard

New

newsletter-form-light-line

newsletter-form-light-line

Light Line

Newsletter signup example showing the arrow-only NewsletterLineForm inside a dark glass card, set over a pool-light ground.

pnpm dlx shadcn add @01orbital/newsletter-form-light-line

Anatomy

Newsletter Form is built from 2 parts. In the example they nest like this:

NewsletterForm

API reference

NewsletterForm

Prop

Type

It also accepts the HTML attributes of the element it renders.

NewsletterLineForm

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: @phosphor-icons/react, cn. The CLI installs them for you.

Registry pieces it installs with it: