组件 搜索框 搜索框组件

搜索框组件

一个响应式搜索框组件,采用粗犷主义风格设计,支持深色主题,使用 Tailwind CSS。

预览

HTML 代码

<div class="flex items-center justify-center min-h-screen bg-gray-900 text-white">
    <div class="bg-gray-800 p-8 rounded-lg shadow-lg space-y-4">
        <h1 class="text-3xl font-bold text-center">Search</h1>
        <div class="flex items-center bg-gray-700 p-2 rounded-md">
            <input type="text" placeholder="Type to search..." class="flex-grow bg-transparent border-none text-white outline-none placeholder-gray-400" />
            <button class="ml-2 bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600 transition duration-300">Go</button>
        </div>
        <div class="text-center">
            <img src="https://picsum.photos/200/100" alt="Placeholder image" class="w-full h-auto rounded-md mt-4">
        </div>
        <div class="flex items-center justify-between mt-4">
            <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" class="w-12 h-12 rounded-full">
            <span class="text-sm">User Name</span>
        </div>
    </div>
</div>
<style>
    @media (prefers-color-scheme: dark) {
        body {
            background-color: #1F1F1F;
        }
        .bg-gray-800 {
            background-color: #2d2d2d;
        }
        .bg-gray-700 {
            background-color: #3e3e3e;
        }
    }
</style>

相关组件

搜索框组件

一个简单的搜索框组件,为社交媒体界面设计,支持暗模式,并具有互补的配色方案。

打开

粗犷主义搜索框

一个残酷主义风格的搜索框组件,用于仪表盘,具有互补色彩方案和适度复杂性,支持响应式设计和深色主题,使用 Tailwind CSS。

打开

搜索框组件

一个具有响应式设计和暗黑主题支持的暗黑模式搜索框组件。未使用JavaScript。图像为占位符图像。

打开