Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Minimal Newsletter Footer Block for React

A slim newsletter footer for a weekly letter: one centred title and line, a single email field with the Shine Button inside its box, and a legal band, with a real check and a confirmation in place.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A slim newsletter footer for React with Base UI: one centred column on the page's spine, a short title, one line of promise, and a single email field that holds the Shine Button "Subscribe" inside its box. Under the field a helper line says how often the letter comes; a bad address replaces that line with the problem. A valid address turns the form into a short confirmation in the same space, with a way back. A band under it carries the copyright at the start and the policy links, the nav labelled Footer, at the end. It's built from Field, InputGroup, Guides, Shine Button and Button, with your theme's tokens for every colour.

FAQ

Where does the address go?

Nowhere yet. The submit handler waits 800 milliseconds, as a stand-in for a request, then shows the confirmation. Replace that timer in submit with a call to your mailing-list provider: email holds the address. Show the confirmation when the request succeeds and an error line in place of the helper when it doesn't.

How is the address checked?

The form has noValidate, so the browser's own bubbles stay away. On submit, problemWith checks that something was typed and that it has an @ and a domain. The message replaces the helper line under the field, the field gets aria-invalid, the line is its description, and focus stays on the field. Typing clears the message. Edit problemWith to add rules.

Where is the field's label?

The field's label is "Email address", hidden from sight and read by screen readers; the title above and the placeholder carry the meaning for everyone else. Pressing Enter in the field submits, like the button.

What happens after a valid address?

The form fades out and a status region takes its place at the same height, so nothing below moves: a check, "You are on the list", the address and a small "Use another address" button. The region takes focus when it appears, so a screen reader reads it at once. The button brings back an empty form with focus in the field.

Is the button inside the field?

Yes: the field is an input group, and the Shine Button sits in its end slot, so the pair reads as one control. Clicking the group's padding focuses the input. While the request runs the button shows a spinner and the input is read-only rather than disabled, so focus stays put.

How does it fit on a phone?

The column keeps its width, the field and its button stay on one line down to 320 pixels, and the band stacks: the copyright, then the links. The footer is static, with no entrance animation, so reduced motion changes nothing except the confirmation's fade.

  • Pro

    A newsletter footer for a developer digest: two link groups on one half of a split, and on the other a real sign-up that lets the visitor tick the digests they want, checks the address and confirms in place.

  • Pro

    Three Row Footer

    Newsletter sign-up

    A three-row footer for a leather-goods brand: the brand and four link groups (an accordion on phones), a newsletter band with a real one-line form, and a legal band with the policy links and social icons.

  • Pro

    One Row Footer

    Slim and minimal

    The smallest footer: one row on the spine with a wordmark and a copyright line at the start and four inline links with a drawn underline at the end.

  • Pro

    A centred footer in three tiers: a hairline hanging from the top rule to a round wordmark mark, a row of six links, and the copyright line.

  • Pro

    Social Icons Footer

    Slim and minimal

    A two-row footer: a wordmark and tagline beside five social icon buttons with tooltips, and a ruled band with the copyright and the policy links.

  • Pro

    A centred call to action between solid rails, built around one fully round capsule that holds the email field and a Shine Button, framed by + marks, growing slightly while you type and settling into a confirmation in place.