Back to inputs

Stretch Search Input

A customizable stretch search input component built with Tailwind CSS.

TailWrap.dev/preview

Usage

To use this component in your project, copy the code and paste it into your HTML file. You can customize the component by modifying the Tailwind CSS classes.

1
Copy the code
2
Paste into your project
3
Customize as needed
HTML
<div class="relative"> <input placeholder="Search..." class="input shadow-lg focus:border-2 border-gray-300 bg-white px-5 py-3 rounded-xl w-56 transition-all focus:w-96 outline-none" name="search" type="search" /> <svg class="size-6 absolute top-3 right-3 text-gray-500" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" stroke-linejoin="round" stroke-linecap="round" ></path> </svg> </div>
Tailwind CSS v3.3

Responsive Behavior

This component is fully responsive and adapts to different screen sizes. Use the viewport controls above to preview how it looks on different devices.

Mobile

Optimized for screens smaller than 640px

Tablet

Optimized for screens between 640px and 1024px

Desktop

Optimized for screens larger than 1024px