一个响应式过滤器组件,具备微交互、生动的动画,并支持暗主题,使用Tailwind CSS。
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6 space-y-6"> <h2 class="text-lg font-semibold text-gray-900 dark:text-white">Filters</h2> <div class="grid grid-cols-1 sm:grid-cols-2 gap-4"> <div class="relative"> <input type="text" placeholder="Search..." class="block w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-200 rounded-md py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-300 transition duration-150 ease-in-out" /> </div> <div class="relative"> <select class="block w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-200 rounded-md py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-300 transition duration-150 ease-in-out"> <option>Category 1</option> <option>Category 2</option> <option>Category 3</option> </select> </div> </div> <div class="flex items-center space-x-4"> <button class="bg-blue-500 dark:bg-blue-700 text-white font-semibold py-2 px-4 rounded-md hover:bg-blue-600 dark:hover:bg-blue-600 transition duration-150 ease-in-out">Apply</button> <button class="bg-gray-300 dark:bg-gray-600 text-gray-800 dark:text-white font-semibold py-2 px-4 rounded-md hover:bg-gray-400 dark:hover:bg-gray-500 transition duration-150 ease-in-out">Reset</button> </div> <div class="grid grid-cols-1 sm:grid-cols-2 gap-4"> <div class="bg-gray-100 dark:bg-gray-700 rounded-md overflow-hidden shadow transition duration-150 ease-in-out hover:shadow-lg"> <img src="https://picsum.photos/200/100?random=1" alt="placeholder image" class="w-full h-20 object-cover" /> <div class="p-4"> <h3 class="text-gray-900 dark:text-white font-bold">Item 1</h3> <p class="text-gray-600 dark:text-gray-300">Description of Item 1</p> </div> </div> <div class="bg-gray-100 dark:bg-gray-700 rounded-md overflow-hidden shadow transition duration-150 ease-in-out hover:shadow-lg"> <img src="https://picsum.photos/200/100?random=2" alt="placeholder image" class="w-full h-20 object-cover" /> <div class="p-4"> <h3 class="text-gray-900 dark:text-white font-bold">Item 2</h3> <p class="text-gray-600 dark:text-gray-300">Description of Item 2</p> </div> </div> </div> </div>
一个采用拟物风格的滤镜组件,专为具有灰度色彩方案和响应式设计的仪表板设计,并支持黑暗主题。
用于医疗保健应用的响应式复古/复古风格滤镜组件,具有秋天色彩和深色模式支持。它包括用于类别、日期范围和状态的交互式筛选选项。
用于电子商务的响应式过滤器组件,具有引人入胜的微交互和三分色彩方案,支持暗模式。