Skip to main content
Signature

Import

To ensure optimal bundle sizes, see Optimize build size.
Vue

See this widget in action

Preview this widget and its behavior.

About this widget

The ais-clear-refinements widget displays a button that lets users clears every currently applied refinement.

Examples

Vue

Props

excluded-attributes
string[]
default:"['query']"
The attributes to exclude from the refinements to clear. In the example below, the attribute brand is excluded from the refinements to clear.This can’t be used with included-attributes.
Vue
included-attributes
string[]
default:"[]"
The attributes to include in the refinements to clear (all by default). In the example below, only the categories attribute is included in the refinements to clear.This can’t be used with excluded-attributes.
Vue
transform-items
function
default:"items => items"
A function that receives the list of items before they are displayed. It should return a new array with the same structure. Use this to transform, filter, or reorder the items.The function also has access to the full results data, including all standard response parameters and parameters from the helper, such as disjunctiveFacetsRefinements.
To prevent creating infinite loops, avoid passing arrays, objects, or functions directly in the template. These values aren’t referentially equal on each render, which causes the widget to re-register every time. Instead, define them in your component’s data option and reference them in the template.
Vue
class-names
object
default:"{}"
The CSS classes you can override:
  • ais-ClearRefinements. The root container of the widget.
  • ais-ClearRefinements-button. The button of the widget.
  • ais-ClearRefinements-button--disabled. The disabled button of the widget.
Vue

Customize the UI

default
The slot to override the complete DOM output of the widget.When you implement this slot, none of the other slots will change the output, as the default slot surrounds them.Scope
  • canRefine: boolean. Are there any refinements?
  • refine: () => void. The function to clear all the refinements.
  • createURL: () => string. The function to return a link for the search without the refinements.
Vue
resetLabel
The slot to override the DOM output for the label of the reset button.
Vue

HTML output

HTML
Last modified on July 10, 2026