# Filters

### Purpose

The Filters component is a wrapper for the [Filter](/components/filter.md) component, it provides a simple way to render all of the filters.

### Usage

If a render method is not provided the built-in component for sorting will be rendered.

{% tabs %}
{% tab title="Basic" %}

```tsx
import React from "react";
import { Filters } from "@usereactify/search";

export const Component: React.FC = () => {
  return (
    <Filters
      renderFilterList={ExampleFilterList}
      renderFilterRange={ExampleFilterRange}
      renderFilterSlider={ExampleFilterSlider}
    />
  );
};

```

{% endtab %}
{% endtabs %}

### Props

```typescript
type FiltersProps = {
  /** Render method for List filters */
  renderFilterList?: React.FC<{
    filter: ConfigFilterOption;
    filterListProps: ReturnType<typeof useFilterListProps>;
  }>;
  /** Render method for Range filters */
  renderFilterRange?: React.FC<{
    filter: ConfigFilterOption;
    filterRangeProps: ReturnType<typeof useFilterRangeProps>;
  }>;
  /** Render method for Slider filters */
  renderFilterSlider?: React.FC<{
    filter: ConfigFilterOption;
    filterSliderProps: ReturnType<typeof useFilterSliderProps>;
    reactSliderProps: ReturnType<typeof useReactSliderProps>;
  }>;
  /** Show filters even when no options are available */
  showEmptyFilters?: boolean;
};
```

### Configure

The Filters component is configured within the Filters Groups page of the Reactify Search app.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://search.docs.reactify.com.au/components/filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
