A storefront filter.

To learn about supporting filters in your theme, refer to Support storefront filtering.

PropertiesTypeDescription
active_valuesarray of filter_valueThe values of the filter that are currently active.
inactive_valuesarray of filter_valueThe values of the filter that are currently inactive. The array can have values only for the list type filters.
labelstringThe customer-facing label for the filter.
max_valuefilter_valueThe highest filter value. Returns a value only for price_range type filters. Returns nil for other types.
min_valuefilter_valueThe lowest filter value. Returns a value only for price_range type filters. Returns nil for other types.
param_namestringThe URL parameter for the filter. For example, filter.v.option.color.
range_maxnumberThe highest product price within the collection results. Returns a value only for price_range type filters. Returns nil for other types.
range_minnumberThe lowest product price within the collection results. Returns a value only for price_range type filters. Returns nil for other types.
typestringThe type of filter. Possible values: list, price_range
url_to_removestringThe current page URL with the URL parameter related to the filter is removed.
valuesarray of filter_valueThe values of the filter. The array can have values only for the list type filters.
{
  "label": "availability",
  "param_name": "filter.v.availability",
  "type": "list",
  "range_min": 0,
  "range_max": 0,
  "values": [
    {
      "param_name": "filter.v.availability",
      "label": "1",
      "value": "1",
      "active": false,
      "count": 137
    },
    {
      "param_name": "filter.v.availability",
      "label": "0",
      "value": "0",
      "active": false,
      "count": 4
    }
  ],
  "active_values": null,
  "inactive_values": [
    {
      "param_name": "filter.v.availability",
      "label": "1",
      "value": "1",
      "active": false,
      "count": 137
    },
    {
      "param_name": "filter.v.availability",
      "label": "0",
      "value": "0",
      "active": false,
      "count": 4
    }
  ],
  "max_value": null,
  "min_value": null,
  "url_to_remove": "/collections/all-collections?="
}