shadcn.io is not affiliated with official shadcn/ui
Email Capture Light Pill CTA Block for React
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.
Installation
Overview
A centred call to action whose form is a single capsule, for React with Base UI. Between the page's solid rails, a "Beta now open" pill, a headline and a line of copy sit above one fully round shape that holds the email field and a "Join beta" Shine Button, the block's only primary control. The capsule sits in a frame of + marks, grows a little while the field has focus, and the button's light sweeps across it when the pointer or the keyboard reaches it. Submitting shows the button's spinner, then the same button shows a check and "Requested", the field turns read-only with the address in it, and a line under the capsule says "You are in". It's built from Input Group, Shine Button, Announcement, Status, Field and Guides, with Lucide icons, Tailwind CSS and CSS transitions that stay still under reduced motion, and it follows the theme. Made for product launches, early-access programs and betas that need one low-commitment field.
FAQ
How is the capsule built?
An Input Group made fully round, with a little padding so the button sits inside its curve: the input has no border of its own and the button is in the group's end slot. The group draws the focus ring when its input has focus (the + marks around it stay put), and grows by two percent while the field has focus, with a CSS scale transition, which moves nothing around it. With reduced motion the growth is instant and the button's light fades in where it stands instead of sweeping.
How does the button change without changing size?
The "Join beta" and "Requested" labels share one grid cell, so the button is as wide as the longer one, and only one is visible at a time. While the request runs the button shows its spinner over the invisible label, and after it succeeds the check label fades in. The button is marked unavailable, not disabled, so pressing it again does nothing but it stays in the tab order.
What happens after the address is accepted?
The field turns read-only and keeps the address, so the capsule shows who is signed up. Focus moves to the line under it, so a screen reader reads "You are in. Check your inbox for next steps." and the keyboard carries on from there. "Use a different address" empties the field, unlocks the capsule and puts focus back in the field.
How is the address validated?
The form has noValidate and submit calls checkValidity(), which reads the input's type="email" and required. A bad address shows its message under the capsule and returns focus to the field; typing clears it.
How do I connect it to my beta list?
The request is simulated in submit: when the address passes, phase goes to "sending" and a timer (LATENCY) sets it to "done". Replace the timer with your request and set "done" when it succeeds; on failure go back to "idle" and put the reason in error. The timer is cleared when the block unmounts.
Does the capsule fit a 320 px screen?
Yes. The button's label is short on purpose, "Join beta", so the field keeps enough room for an address. The capsule stays one row at every width instead of stacking, and the confirmation line wraps and reserves two lines on phones so nothing moves when it appears.
Related
- Pro
Light Email Capture CTA
Forms and captureA 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
Centered Light Avatar Email Capture CTA
Forms and captureA 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.
- Pro
Centered Email Capture CTA
Forms and captureA 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
Centered Inline Email Signup Hero
Signup and waitlistA short centered waitlist hero with an email field and a Shine Button on one row inside a framed box, a confirmation in place, an avatar row and two trust points.
- Pro
Centered Email Capture Form Hero
Signup and waitlistA compact centered newsletter hero with the email field in a full-width band between two hairlines: a Shine Button subscribes, then a confirmation replaces the form, over a row of subscriber proof.
- Pro
Copy Link Share CTA
Forms and captureA 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.