Block 44 of 297
Newsletter Signup
An email signup that posts to any form endpoint, with a real labelled input and no JavaScript.
- Puck key
- NewsletterSignupBlock
- Export
- newsletterSignupBlock
- React component
- <NewsletterSignup />
- Path
- components/puck/newsletter-signup-block.tsx
- Dependencies
- None
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
An email signup form that posts directly to your mailing-list provider, with no JavaScript involved. The panel layout puts the heading and copy beside the form on a dark card; the centered layout stacks everything on a white background. On phones the email field and button stack, each full width.
- A site-wide footer-adjacent signup for a monthly newsletter
- A park or recreation page where people want registration reminders
- A blog or news index that invites readers to get updates by email
Writing the content
- Copy the Form action URL and Email field name from your provider's embed code; the name must match exactly, such as EMAIL.
- Only the email address is sent. Providers that need hidden fields or a list ID need those added in code.
- Field label is read by screen readers but not shown. Use the Privacy note for how often you send and how to unsubscribe.
Accessibility
- The input is wrapped in a label element with visually hidden text, so it has an accessible name even though no label is shown (WCAG 4.1.2).
- The field is type="email", required and set to autocomplete="email", so browsers can validate and autofill it.
- Only the placeholder is visible as a prompt, and it disappears once someone types; if your audience needs a persistent visible label, remove the sr-only class.
Customizing the code
- The panel background is bg-neutral-950 and the button and focus rings use indigo-600 and indigo-400.
- To add hidden inputs your provider requires, place them inside the form element next to the email label.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Bodytextarea
- Form action URLtext
- Email field nametext
- Field labeltext
- Placeholdertext
- Button texttext
- Privacy notetextarea
- Layoutradio