Problem: The search modal aesthetic.
Solution#
<div class="fixed inset-0 z-50 bg-black/40 p-4 pt-[15vh]">
<div class="mx-auto max-w-xl overflow-hidden rounded-xl bg-white shadow-2xl">
<input class="w-full px-4 py-3 text-lg outline-none" placeholder="Type a command…" />
<div class="border-t p-2 text-sm">results…</div>
</div>
</div>Why this works#
Centered-top modal + big input + results list.
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
