Skip to content

Block 158 of 297

Council Districts

Council districts or wards with neighborhoods covered, each representative's contact details and an address lookup.

Puck key
CouncilDistrictsBlock
Export
councilDistrictsBlock
React component
<CouncilDistricts />
Path
components/puck/council-districts-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

Council district cards in a grid, each showing the district number, its neighborhoods as small tags, the representative's name, title and contact links. A dark "find your district" panel with an address form can sit beside the heading. Cards go from one column on phones to two and then three. It works for any city that elects council members or aldermen by district or ward.

  • A city council landing page introducing every member
  • A "Who represents me" page linked from the site header
  • A redistricting page showing new district boundaries and members
Writing the content
  • Set District or ward to the word your city uses; it prints above every number.
  • Enter Neighborhoods separated by commas. Leave Representative blank for an open seat and the card will read "Seat currently vacant".
  • The lookup panel only appears when Lookup page URL is filled in. Address query name must match the parameter your lookup page reads, usually address.
  • Use Address example text for a sample address only, not instructions, since it disappears as people type. The block holds up to 15 districts.
Accessibility
  • The address input has a visible label element tied to it and autocomplete="street-address", so browsers can fill it in (WCAG 1.3.5, 3.3.2).
  • Phone and email links carry hidden "Call" and "Email" prefixes, and the initials circle is hidden from screen readers since the full name follows.
Customizing the code
  • The lookup panel uses bg-indigo-950 and the district numbers text-indigo-700; change these and the focusRing constant to rebrand.
  • The initials helper strips titles like Council Member or Ald. before taking two initials; extend its regex for other honorifics.

Editor fields

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

  • Eyebrowtext
  • Headingtext
  • Heading levelselect
  • Introtextarea
  • District or wardtext
  • Lookup headingtext
  • Lookup texttextarea
  • Lookup page URLtext
  • Address query nametext
  • Address labeltext
  • Address example texttext
  • Map link texttext
  • Map linktext
  • Districtsarray