Skip to content
Haze UI

Footer with newsletter signup

Footer with a prominent newsletter panel, a native email form, and a compact resource and copyright row.

pnpm dlx shadcn@latest add @haze/footer-newsletter
Open preview in a new tab
Liveno JavaScript

When to use

  • A publication or product collects subscriptions at the end of most pages
  • The signup needs space for a clear description and privacy note

When not to use

  • There is no subscription endpoint. Use footer-compact.
  • The newsletter should sit independently of the site footer. Use newsletter-inline.

Installation

Add the Haze registry to components.json once, then install Footer with newsletter signup with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/footer-newsletter
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
idstring"haze-footer-newsletter"Unique prefix used to associate the control with its label and hint.
brandstring"Fieldwork"Wordmark text.
homeHrefstring"/"Destination of the wordmark link.
titlestring"The Fieldwork dispatch"Heading introducing the newsletter.
headingLevel2 | 3 | 42Heading level appropriate to the containing page.
descriptionstringDemo dispatch descriptionDescribe what readers will get and how often.
formActionstring–Required to receive subscriptions. The form sends the email field in a POST. The preview uses a placeholder endpoint and labels it.
emailLabelstring"Email address"Visible label for the email field.
emailPlaceholderstring"you@company.com"Example address shown in the empty field.
submitLabelstring"Subscribe"Text on the form submit button.
privacyNotestring"Unsubscribe at any time."Hint associated with the email field when an endpoint is configured. Empty text hides it.
linksLink[]Documentation, Browse the libraryResource or policy links below the form.
navLabelstring"Footer links"Accessible name for the footer navigation.
copyrightstring"© 2026 Fieldwork"Copyright or attribution text.
classstring–Additional classes on the footer.

Keyboard interactions

Enter
Submit the email address from the field or button.

Accessibility

  • The email input has a persistent, visible label and uses native email validation.
  • The form description is associated with the field when present. The server handles errors and confirmation after submission.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI block "Footer with newsletter signup" with `npx shadcn@latest add @haze/footer-newsletter`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import FooterNewsletter from "@/components/haze/blocks/footer-newsletter.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/footer-newsletter.md

  • Customize with real content

    Adapt the Haze footer-newsletter block for our product. Replace the demo values of these props with our real content: id, brand, homeHref, title, headingLevel, description, formAction, emailLabel, emailPlaceholder, submitLabel, privacyNote, links, navLabel, copyright, class. Keep the layout, the heading level rules and these accessibility details: The email input has a persistent, visible label and uses native email validation. The form description is associated with the field when present. The server handles errors and confirmation after submission. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using footer-newsletter, check it fits: use it when a publication or product collects subscriptions at the end of most pages; the signup needs space for a clear description and privacy note. Avoid it when there is no subscription endpoint. use footer-compact.; the newsletter should sit independently of the site footer. use newsletter-inline.. Alternatives: @haze/footer-compact, @haze/footer-accordion, @haze/newsletter-inline.

Dependencies

  • npm: @lucide/astro
  • @haze/button
  • @haze/input
  • @haze/logo-mark
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog