组件 过滤 器 过滤器组件

过滤器组件

一个极简主义的过滤器组件,采用响应式设计,使用 Tailwind CSS,支持暗黑主题。

预览

HTML 代码

<div class="bg-white dark:bg-gray-800 shadow-md rounded-lg p-4">
  <h3 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Filters</h3>
  <div class="flex flex-col space-y-2">
    <div class="flex items-center justify-between">
      <label for="category" class="text-gray-700 dark:text-gray-300">Category:</label>
      <select id="category" class="border border-gray-300 dark:border-gray-600 rounded-md px-2 py-1 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-200">
        <option value="all">All</option>
        <option value="electronics">Electronics</option>
        <option value="books">Books</option>
        <option value="clothing">Clothing</option>
      </select>
    </div>
    <div class="flex items-center justify-between">
      <label for="price" class="text-gray-700 dark:text-gray-300">Max Price:</label>
      <input type="range" id="price" min="0" max="1000" value="1000" class="w-full ml-4">
    </div>
    <div class="flex items-center justify-between">
      <label for="sort" class="text-gray-700 dark:text-gray-300">Sort By:</label>
      <select id="sort" class="border border-gray-300 dark:border-gray-600 rounded-md px-2 py-1 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-200">
        <option value="newest">Newest</option>
        <option value="price-low-high">Price: Low to High</option>
        <option value="price-high-low">Price: High to Low</option>
      </select>
    </div>
  </div>
  <button class="mt-6 w-full bg-blue-500 text-white py-2 px-4 rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 dark:bg-blue-700 dark:hover:bg-blue-800 dark:focus:ring-blue-700">Apply Filters</button>
</div>

相关组件

FiltersComponent 组件

一个响应式过滤器组件,以 Material Design 风格设计,适用于支持深色主题的电子商务应用程序。它包括多个交互式元素,以增强购物体验。

打开

Glassmorphism Filters 组件

一个简单、响应式的 Glassmorphism 风格的滤镜组件,适用于产品组合,具有磨砂玻璃般的半透明元素,具有模糊效果、互补色和暗模式支持。

打开

Filters 组件

用于电子商务的极简主义响应式过滤器组件,支持深色主题。它包括类别、价格范围和滤色器。

打开