Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Contact Form Footer Block for React

A contact-form footer for a hosting company: three short link groups on one half of a split, and on the other a compact message form in a card in card that checks itself and confirms 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 contact-form footer for React with Base UI, split behind a hairline that runs from the page's top rule to the end of the page, wider at the start. The start half holds the brand, one sentence and three short link groups in the nav labelled Footer. The end half is a compact form in a card in card with + marks on its corners: an email field, a two-row message and the Shine Button "Send message". Submitting it checks both fields, shows each problem under its field, marks the control invalid and moves focus to the first one; a valid message turns into "Message sent" in the same space, which takes focus. A legal band runs under both halves. It's built from Field, Input, Textarea, Guides, Shine Button and Button, with your theme's tokens for every colour.

FAQ

Where does the message 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 support inbox, help desk or form endpoint: email and message hold what was typed. Show the confirmation when the request succeeds and an error line in the form when it doesn't.

How does the form check what is typed?

The form has noValidate, so the browser's own bubbles stay away and the block shows its own messages. On submit, problems checks that the email has an @ and a domain and that the message is not empty. Each problem appears under its field with an icon, the control gets aria-invalid and an aria-describedby that points to the message, and focus moves to the first one. Typing in a field clears its message.

What does the confirmation say, and who hears it?

It repeats the email address the reply will go to, so the visitor can spot a typo, and says how soon to expect it. It's a status region that takes focus when it appears, so a screen reader reads it at once; "Send another message" brings back an empty form and puts focus on its heading. The form and the confirmation share one space, so the footer does not change height.

How tall is the message box?

Two rows to start, a minimum height of four rem, and it does not resize by hand: the footer stays compact. Raise min-h-16 on the Textarea for a roomier box.

How does it fit on a phone?

Below lg the halves stack with a rule between them: the brand and the link groups (two to a row, three from sm), then the form card, then the legal band. The submit button goes full width. Nothing scrolls sideways at 320 pixels, and the footer has no entrance animation.

  • 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

    Contact Details Footer

    Company and places

    A contact-details footer for an accounting firm: the brand and two link groups on shared hairlines, and four contact points as cells in a definition list, each with an icon: email, phone, postal address and reply time.

  • Pro

    Support Hub Footer

    Company and places

    A support-hub footer for a help-desk product: a question and a row of help links, then three support channels as cells, live chat with an online status, email with its reply time and phone with its hours, each one link.

  • Pro

    The classic link-column footer for an email API: a brand column with the wordmark, one sentence and four social links, four groups of links behind a split divider, and a legal band with the copyright and the policy links.

  • Pro

    A talk-to-sales split for a scheduling platform: what happens next as three numbered steps and a band of contact details beside a form that checks itself, shows each problem under its field and confirms in place.

  • Pro

    A brand-first split footer for a design tool: a display wordmark, a tagline and the Shine Button on one half, three link columns and the legal row on the other.