Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Centered Light Avatar Email Capture CTA Block for React

A newsletter call to action in a framed form panel where the topics are toggle chips, each with its author's avatar: pick at least one, add an email, and the confirmation lists what you chose.

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 centered newsletter call to action that lets the visitor choose what they hear about, for React with Base UI, and follows your theme. A headline and a line of copy for Loomwork, a made-up design tool's weekly notes, sit above a framed panel with a + mark on each corner. In it are three toggle chips, Design, Engineering and Product, each with a small avatar of the person who writes that topic. Two are chosen when the page loads; a line under them counts the choice. Below, an email field with a mail icon and a Shine Button "Subscribe" share a row. Submitting checks that at least one topic is chosen and the address is valid, shows the button's spinner, then swaps the form for a confirmation that lists the chosen topics as badges. It's built from Toggle Group, Avatar, Badge, Input Group, Field, Guides and Shine Button. Made for blog footers, changelog pages and product-update signups where readers want only part of what you publish.

FAQ

How do the topic chips work?

The chips are a multiple-choice toggle group: each one is a button that is pressed or not, and any combination is allowed. A pressed chip gets a foreground border, a muted fill and a small check on its avatar, so the state isn't carried by colour alone. The chosen topics live in one list, picked, which the confirmation reads when the form is sent.

What if nobody picks a topic?

Pressing "Subscribe" with nothing chosen doesn't send anything: a message with a warning icon says "Pick at least one topic" in a polite live region under the chips, and focus goes to the first chip. Choosing a topic clears it. The email is checked after the topics, so each problem is shown on its own.

How do I show the real authors?

The data at the top of the file, TOPICS, holds each topic's label, its author's name and initials. Replace the initials with a photo by adding an AvatarImage before the fallback in the chip; the initials stay as the fallback while it loads. The avatar is decorative, and a screen reader hears the author in the chip's name, "Design, by Mira Okafor", through visually hidden text.

How does the keyboard work?

Tab reaches the chips, and Space or Enter presses one; the email field and the button follow in order. Each chip's name is its label and its author, and the group is named "Topics" and introduced by the "Pick what you want" legend. The count under the chips is a polite live region, so a screen reader hears the new count after each change.

How do I send the choice to my email provider?

The request is simulated in submit: sent keeps the topics that were chosen, phase goes to "sending" and a timer (LATENCY) sets it to "done". Replace the timer with a request that sends the address and the list of topic values, for example as tags or list ids, and return to "idle" with a message if it fails. "Use another address" resets the form for the next person.

How does it look on a phone?

The chips wrap and stay centered, two on one line and one below at 320 px, and the email field and button stack at full width. The confirmation wraps a long address anywhere instead of widening the panel.

  • Pro

    Light Email Capture CTA

    Forms and capture

    A newsletter CTA as a band between solid rails: a headline and a sentence at the start, and at the end one Shine Button that opens in place into an email field with its own Shine submit, closes on Escape and ends in a confirmation.

  • Pro

    A call to action between solid rails that follows the page theme, in a card in card with a two-step email capture: an email field and a Shine Button, then a six-digit code that verifies on the sixth digit and turns into a confirmation in the same space.

  • 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.

  • Pro

    A light waitlist CTA as a split between solid rails: the headline, a sentence and the email form with the Shine Button at the start, and a capacity panel at the end whose bar gets a You pin and a count that rolls up by one when you join.

  • Pro

    Waitlist Signup Hero

    Signup and waitlist

    A compact waitlist hero: the copy beside a card-in-card email form that turns into a confirmation in place, with a closing band of three features coming at launch.

  • Pro

    Copy Link Share CTA

    Forms and capture

    A band call to action for a referral programme that follows your theme: the pitch beside a read-only invite field with a Shine Button that copies it, real email and system share links, and a closing band counting invites.