Skip to content

Block 69 of 297

Preference Center

Email preference center with list checkboxes and cadence tags, a frequency choice and an unsubscribe-all option.

Puck key
PreferenceCenterBlock
Export
preferenceCenterBlock
React component
<PreferenceCenter />
Path
components/puck/preference-center-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 preferences form that lets subscribers choose individual lists, each with a description and a how-often tag, plus an overall frequency choice and an unsubscribe-from-everything checkbox. The email field can be turned off when the page is reached from a personalized link. Everything sits in one centered column on every screen size.

  • The page linked from "manage preferences" in newsletter footers
  • A nonprofit offering separate lists for news, volunteer calls and advocacy
  • A park or library system with program-specific announcement lists
Writing the content
  • Add one to ten Lists. Describe what each one actually sends in What's in it, and use How often for a short tag like Weekly or Seasonal.
  • Leave Checked at first off when your email platform fills in the subscriber's current choices; otherwise the defaults may overwrite them.
  • The first Frequency option is selected by default. Remove all of them to hide the question.
  • The Unsubscribe option is a checkbox only. Your endpoint must treat unsubscribe_all as overriding the list choices; the block doesn't clear them.
Accessibility
  • Lists and frequency are fieldsets with visible legends, and each list's description is tied to its checkbox with aria-describedby (WCAG 1.3.1).
  • Checkboxes and their labels sit in rows at least 44px tall, with indigo focus outlines on the checkboxes.
  • The email field explains why it's required in a linked hint and uses autocomplete="email".
Customizing the code
  • Selected frequency cards use has-checked styling on the label; checkboxes are tinted with accent-indigo-600.
  • Field names are email, topics, frequency and unsubscribe_all; rename them in the markup to match your platform.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Form action URLtext
  • Ask for emailradio
  • Listsarray
  • Frequency optionsarray
  • Save button texttext
  • Unsubscribe optiontext
  • Unsubscribe helptext
  • Footnotetextarea