Problem: Inline email capture.
Solution#
<form class="flex max-w-md gap-2">
<input type="email" class="flex-1 rounded-lg border px-3 py-2" placeholder="you@example.com" />
<button class="rounded-lg bg-slate-900 px-4 py-2 text-white text-sm">Subscribe</button>
</form>Why this works#
flex capture row; add success/error states from the validation recipe.
Variants#
- Responsive: add screen prefixes to the core classes
- Dark: pair each color utility with its dark: twin
- Animated: add
transition+ a state variant for motion
Related recipes#
cookbook/index|Cookbook index · utilities/index|Utilities reference · patterns/index|Layout patterns
