Inline Newsletter Form
One row, one field, one button - the smallest honest email capture.
6 फ्रेमवर्कशुरुआती
A full-width strip that sits above the site footer.
<!--
A full-bleed strip that sits above the site footer proper. It paints its own
dark surface at both themes, which is what lets it read as a band across the
page rather than another card - and, conveniently, means its white text has a
fixed contrast ratio instead of an inherited one.
-->
<aside class="nl-bar" aria-labelledby="nl-bar-title">
<div class="nl-bar__inner">
<div class="nl-bar__copy">
<h2 class="nl-bar__title" id="nl-bar-title">Get the monthly roundup</h2>
<p class="nl-bar__text">Product news and field notes. One email a month.</p>
</div>
<form class="nl-bar__form" action="/api/subscribe" method="post">
<label class="nl-bar__label" for="nl-bar-email">Email address</label>
<input
class="nl-bar__input"
id="nl-bar-email"
name="email"
type="email"
autocomplete="email"
placeholder="you@company.com"
required
/>
<button class="nl-bar__submit" type="submit">Sign up</button>
</form>
</div>
</aside>| Prop | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
titleआवश्यक | string | - | कार्ड की हेडिंग टेक्स्ट। |
copy | string | - | टाइटल के नीचे दिखने वाला मुख्य टेक्स्ट। |
ctaLabel | string | 'Sign up' | कॉल-टू-एक्शन बटन का टेक्स्ट। |
className | string | - | रूट एलिमेंट पर मर्ज होने वाली अतिरिक्त क्लासेज़। |
The bar paints its own dark surface at both themes and has no `dark:` variants at all - that is what makes it read as a band across the page rather than one more card, and it means the white text has a fixed contrast ratio instead of an inherited one. The field inside is styled for the dark band, not the page, so it stays `gray-950` in light mode too. Below `md` the copy and the form stack and the form goes full width; above it, `min-w-96` keeps the input from being crushed by a long headline sharing the row.