Skip to main content
The <ws-filter-chip> component displays the currently applied filters in the frontend. It is updated automatically as soon as filters are added or removed. Clicking one of the displayed filters removes it again.

Requirement

  • The component is used in combination with <ws-filter>.
  • If no filters are defined, there are no active filters to display or remove.

Component

The component can be embedded as follows on the category and search result page:
The component generates HTML elements for displaying the active filters. Each filter is rendered as a so-called “chip” component that can be removed.

Optional attribute neq-label

Via the neq-label attribute you can control how negative filters (i.e. filters with negate) are displayed. For a negative filter, the value is displayed with a 🚫 symbol, e.g. 🚫 blue. If a different prefix is desired or the symbol should be suppressed entirely, the neq-label attribute can be adjusted accordingly:
Result: not blue instead of 🚫 blue.

Optional attribute btn-class

The btn-class attribute controls which class is assigned to the generated button.

CSS & styling

This component generates the following CSS classes for styling:
  • chip-container: Container for the whole list of applied filters.
  • chip: Individual applied filter.
  • closebtn: Button that removes the filter. (Only when no individual class is provided via btn-class.)
The styling can be adjusted through these classes. However, the component itself cannot be extended with additional HTML or CSS inside its container.

URL filter parameters

Filters can be passed directly to the search module via the URL – e.g. for campaigns, preselections, or direct links with active filters. More about this in the documentation on URL filter parameters.