A dark, centered Bootstrap 6 hero for a newsletter or product waitlist. It has an announcement pill, a headline with a violet-to-teal gradient, a short pitch, an inline email form and a row of subscriber avatars. The form validates the address, shows a spinner during a simulated request and then swaps itself for a confirmation message.
How it works
The section .ces-root is pinned to data-bs-theme="dark". Its background is a faint CSS grid made from two linear-gradient layers. A blurred .ces-glow element adds two colored light spots, and a radial ::after vignette fades the edges into the page color. Everything is centered inside .ces-inner, which is capped by --ces-max.
The .ces-pill link combines a badge theme-accent rounded-pill with the latest issue title. The .ces-grad span in the <h1> uses background-clip: text for the gradient words.
The form is a Bootstrap 6 input-group input-group-lg with an icon addon, the email field and a btn-solid theme-accent input-group-btn submit button. .ces-group restyles the group as one rounded glass bar, so the input and button look like a single control.
script.js listens to the form's submit event and calls preventDefault(). It checks the address with a simple pattern. In alpha.1, Bootstrap 6 does not show feedback for fields inside an .input-group. So the script toggles is-invalid on the group and the input itself, and a sibling rule reveals .ces-error. On a valid address it disables the button, shows .spinner-border.spinner-sm and changes the label to "Subscribing". After 1.2 seconds it hides the form and writes the confirmation into the .ces-done live region.
Customization
--ces-fromand--ces-toon.ces-root: the headline gradient, glow and focus colors.--ces-bgon.ces-root: the page color used by the vignette and the avatar borders.--ces-maxon.ces-root: the width of the centered content column.background-size: 44px 44pxin.ces-root: the grid cell size; remove bothlinear-gradientlayers for a plain background.- Replace the
setTimeoutin thesubmithandler with afetch()POST to your newsletter provider (the comment marks the spot). patterninscript.js: the email check; adjust it or rely on server validation.- Change
theme-accenton the submit button and pill badge to another Bootstrap 6 color role, such astheme-success.
Use cases
- Newsletter sites: a gradient headline and inline email field invite readers to subscribe
- Product waitlists: the form validates the address and shows a spinner while submitting
- Launch pages: an announcement pill sits above the headline
- Community sites: a row of subscriber avatars adds social proof
Accessibility
The input has a visually hidden <label> and is described by the privacy hint and the error text. Invalid submissions set aria-invalid="true", show the message in red text and move focus back to the field. The error clears as soon as the address becomes valid. The confirmation is a polite role="status" region that receives focus, so screen reader and keyboard users land on the result. The pill, input and button all show visible focus styles. The pill hover transition is off under prefers-reduced-motion.
Bootstrap 6 notes
Bootstrap 5's btn btn-primary becomes btn-solid theme-accent, buttons inside input groups get input-group-btn, and spinner-border-sm is now spinner-sm. Initials avatars use the new avatar theme-* and avatar-stack components. Built on Bootstrap 6.0.0-alpha.1, so APIs may still change.