InstantSearch specs

✏️ edit page

ClearRefinements

Widget example

HTML output

<div class="ais-ClearRefinements">
  <button class="ais-ClearRefinements-button">
    Clear refinements
  </button>
</div>

CSS classes

Hint: hover classes below to see their position.

name description
.ais-ClearRefinements the root div of the widget
.ais-ClearRefinements-button the clickable button
.ais-ClearRefinements-button--disabled the disabled clickable button

Options

Note: this is a guideline for new InstantSearch flavours, not a rule.

name default value description
includedAttributes all searchable attributes The attributes to include in the refinements (all by default)
excludedAttributes ['query'] The attributes to exclude from the refinements
transformItems Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them

Translations

Note: this is a guideline for new InstantSearch flavours, not a rule.

name default value description
resetButtonText "Clear refinements" The text for the reset button.