Skip to content

Category Components

Components for category listing pages — product grids, filtering, toolbars, and category-specific features.

Category page — sidebar filters, product grid, header navigation

Component Slots

Category Domain

SlotDescription
gridProduct grid layout
heroCategory hero banner
toolbarSort + view options bar
banner-inlinePromotional banner between product rows
subcategory-tilesVisual subcategory navigation tiles

Filtering Domain

SlotDescription
sidebarFilter sidebar panel
price-rangeDual-thumb price range slider
sort-selectSort order dropdown
paginationPage navigation controls
chip-barActive filter chip display

Grid Layout

The product grid is responsive with configurable columns per breakpoint:

json
{
  "pages": {
    "category": {
      "gridColumns": {
        "mobile": 2,
        "tablet": 3,
        "desktop": 4
      }
    }
  }
}

Grid columns are resolved via getGridColumns('category') and applied as CSS grid classes.

Filter Sidebar

The filter sidebar displays layered navigation attributes (color, size, brand, price range). On desktop it appears as a left sidebar; on mobile it slides in as an overlay.

Filter Types

TypeUIExample
AttributeCheckbox listColor: Red, Blue, Green
Price RangeDual-thumb slider + inputs$10 — $200
CategoryLinked listSubcategory navigation

URL-Based Filtering

Active filters are reflected in the URL query string, making filtered views:

  • Bookmarkable
  • Shareable
  • Browser back/forward compatible

Category Hero

Optional hero banner at the top of category pages. Supports:

  • Category image from Maho admin
  • CMS block content overlay
  • Custom HTML content

Toolbar

Top-of-grid toolbar with:

  • Sort select — Price (low/high), Name (A-Z/Z-A), Newest
  • Result count — "Showing 1-24 of 142 products"
  • View toggle — Grid vs. list view (where both card variants exist)

Configuration

json
{
  "pages": {
    "category": {
      "components": {
        "card": "standard",
        "filter": "sidebar"
      },
      "gridColumns": {
        "mobile": 2,
        "tablet": 3,
        "desktop": 4
      }
    }
  }
}

Source: src/templates/components/category/, src/templates/components/filtering/