Components Search Box Search Box Component

Search Box Component

A minimalist search box component designed with Tailwind CSS, featuring responsive effects and dark theme support.

Preview

HTML Code

<div class="flex justify-center items-center p-4">
  <div class="w-full max-w-md">
    <form class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-4">
      <div class="relative">
        <input type="text" class="w-full py-2 pl-10 pr-4 border border-gray-300 rounded text-gray-700 dark:text-gray-300 dark:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400" placeholder="Search..." />
        <svg class="absolute left-3 top-2.5 w-5 h-5 text-gray-500 dark:text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.5 17.5a7 7 0 100-15 7 7 0 000 15zm0 0l5 5m-5-5l-5-5"/>
        </svg>
      </div>
      <button type="submit" class="mt-4 w-full py-2 px-4 bg-blue-500 hover:bg-blue-600 text-white rounded focus:outline-none focus:ring-2 focus:ring-blue-400 dark:bg-blue-700 dark:hover:bg-blue-600 dark:focus:ring-blue-500">Search</button>
    </form>
  </div>
</div>

Related Components

Search Box Component

A search box component designed with a skeuomorphic style to mimic a real-world search box, using a triadic color scheme, suitable for a portfolio and responsive with dark mode support.

Open

Search Box Component

A responsive search box with dark mode support using Tailwind CSS.

Open

Brutalism search box

Search Box Component with Brutalism style, responsive, dark theme support, no JS. Uses picsum.photos for images and randomuser.me for avatars if needed.

Open