Skip to main content

Filter group

Add toDiv / container

Role attribute

Every instance of this component carries:

Add this attribute
Namewf-algolia-element
Valuefilter-group

Variants

This component ships in several presets.

Checkbox

Required2 attributes
FieldRequired

Facet attribute to filter on, e.g. "category".

Accepts e.g. category

IndexRequired

Algolia index this filter group queries.

Accepts e.g. acme_blog_prod

Optional21 attributes
Match

Combine selected values with "or" (any match) or "and" (all match).

Accepts or · andDefault or

Value

Initial pre-selected facet value.

Accepts e.g. Shoes

Field label

Override the display heading shown above this filter group (heading-only).

Accepts e.g. Category

Text more

Label for the "show more" trigger.

Accepts e.g. Show more

Text less

Label for the "show less" trigger.

Accepts e.g. Show less

Apply mode

Defer applying selections until a wf-algolia-button="apply" is clicked.

Accepts immediate · deferredDefault immediate

Debounce

Override the global debounce (ms) for this group's inputs.

Accepts min 0, whole numbers

Facet

Dynamic facet field name. Alternative to wf-algolia-field for dynamically-loaded facet lists.

Accepts e.g. categories.lvl0

Group ID

Hierarchical group identifier; referenced by child groups via wf-algolia-refines.

Accepts e.g. category-lvl0

Refines

Names the parent group-id this filter cascades under: this group is a child whose options re-query scoped to the parent group’s current selection. Enables N-level hierarchical (cascading) filters.

Accepts e.g. category-lvl0

When parent empty

How this group behaves until its parent (wf-algolia-refines) has a selection: "hide" (hidden until the parent is picked) or "disable" (greyed/disabled until the parent is picked).

Accepts disable · hideDefault disable

Link template

URL template for leaf-item clicks in standalone (non-browse) filter groups.

Accepts e.g. /category/{value}

Slugify

Cleans the value into a URL-friendly slug before it goes into the link. Example: "Creative & Brand" becomes creative-brand. Off by default.

Accepts true · falseDefault false

Label

Hierarchical facet label display: "leaf" renders only the deepest path segment (e.g. "Paid Search" instead of "Paid Media > Paid Search"); "full" renders the whole value (default).

Accepts full · leafDefault full

Sort

Reorder the filter-items in this group. "alpha" sorts A→Z by the stored value (case-insensitive); "count" sorts by descending result count; "selected-first" floats checked values to the top; "selected-alpha-zero-last" floats selected items up, sorts the rest A→Z, and sinks zero-result values to the bottom; "natural" (default) keeps DOM order. Applied whenever results update - a dynamically-populated list briefly paints in the default count order until the first response sorts it.

Accepts natural · selected-first · alpha · count · selected-alpha-zero-lastDefault natural

Zero-results class

Class applied while this filter has zero matching results.

Accepts e.g. is-empty

Click

What clicking an item in this filter group does - filter the results, navigate to a link, or nothing.

Accepts e.g. filter

Type

The control style of this filter group: checkbox, radio, select, range or toggle.

Accepts e.g. checkbox

Limit

How many filter items to show before the show-more trigger hides the rest.

Accepts min 1, whole numbers

Search mode

Set to "local" to match the filter-search input against already-loaded values instead of querying Algolia for facet values.

Accepts e.g. local

Show selected missing

Set to "true" to keep a selected value visible even when the latest results no longer contain it, so the user can still clear it.

Accepts e.g. true

Radio

Required2 attributes
FieldRequired

Facet attribute to filter on.

Accepts e.g. category

IndexRequired

Algolia index this filter group queries.

Accepts e.g. acme_blog_prod

Optional18 attributes
Default option

Marks the "All" option in a radio group (re-selected when the field is cleared). Renamed from wf-algolia-reset (deprecated alias).

Accepts e.g. true

Match

Combine selected values with "or" (any) or "and" (all).

Accepts or · andDefault or

Apply mode

Defer applying selections until a wf-algolia-button="apply" is clicked.

Accepts immediate · deferredDefault immediate

Debounce

Override the global debounce (ms) for this group's inputs.

Accepts min 0, whole numbers

Facet

Dynamic facet field name. Alternative to wf-algolia-field for dynamically-loaded facet lists.

Accepts e.g. categories.lvl0

Group ID

Hierarchical group identifier; referenced by child groups via wf-algolia-refines.

Accepts e.g. category-lvl0

Refines

Names the parent group-id this filter cascades under: this group is a child whose options re-query scoped to the parent group’s current selection. Enables N-level hierarchical (cascading) filters.

Accepts e.g. category-lvl0

When parent empty

How this group behaves until its parent (wf-algolia-refines) has a selection: "hide" (hidden until the parent is picked) or "disable" (greyed/disabled until the parent is picked).

Accepts disable · hideDefault disable

Link template

URL template for leaf-item clicks in standalone (non-browse) filter groups.

Accepts e.g. /category/{value}

Slugify

Cleans the value into a URL-friendly slug before it goes into the link. Example: "Creative & Brand" becomes creative-brand. Off by default.

Accepts true · falseDefault false

Label

Hierarchical facet label display: "leaf" renders only the deepest path segment (e.g. "Paid Search" instead of "Paid Media > Paid Search"); "full" renders the whole value (default).

Accepts full · leafDefault full

Sort

Reorder the filter-items in this group. "alpha" sorts A→Z by the stored value (case-insensitive); "count" sorts by descending result count; "selected-first" floats checked values to the top; "selected-alpha-zero-last" floats selected items up, sorts the rest A→Z, and sinks zero-result values to the bottom; "natural" (default) keeps DOM order. Applied whenever results update - a dynamically-populated list briefly paints in the default count order until the first response sorts it.

Accepts natural · selected-first · alpha · count · selected-alpha-zero-lastDefault natural

Zero-results class

Class applied while this filter has zero matching results.

Accepts e.g. is-empty

Click

What clicking an item in this filter group does - filter the results, navigate to a link, or nothing.

Accepts e.g. filter

Type

The control style of this filter group: checkbox, radio, select, range or toggle.

Accepts e.g. checkbox

Limit

How many filter items to show before the show-more trigger hides the rest.

Accepts min 1, whole numbers

Search mode

Set to "local" to match the filter-search input against already-loaded values instead of querying Algolia for facet values.

Accepts e.g. local

Show selected missing

Set to "true" to keep a selected value visible even when the latest results no longer contain it, so the user can still clear it.

Accepts e.g. true

Range

Required2 attributes
FieldRequired

Numeric facet attribute to filter on.

Accepts e.g. price

IndexRequired

Algolia index this filter group queries.

Accepts e.g. acme_blog_prod

Optional16 attributes
Format

Display format for the range values.

Accepts e.g. number

Apply mode

Defer applying selections until a wf-algolia-button="apply" is clicked.

Accepts immediate · deferredDefault immediate

Debounce

Override the global debounce (ms) for this group's inputs.

Accepts min 0, whole numbers

Facet

Dynamic facet field name. Alternative to wf-algolia-field for dynamically-loaded facet lists.

Accepts e.g. categories.lvl0

Group ID

Hierarchical group identifier; referenced by child groups via wf-algolia-refines.

Accepts e.g. category-lvl0

Refines

Names the parent group-id this filter cascades under: this group is a child whose options re-query scoped to the parent group’s current selection. Enables N-level hierarchical (cascading) filters.

Accepts e.g. category-lvl0

When parent empty

How this group behaves until its parent (wf-algolia-refines) has a selection: "hide" (hidden until the parent is picked) or "disable" (greyed/disabled until the parent is picked).

Accepts disable · hideDefault disable

Link template

URL template for leaf-item clicks in standalone (non-browse) filter groups.

Accepts e.g. /category/{value}

Slugify

Cleans the value into a URL-friendly slug before it goes into the link. Example: "Creative & Brand" becomes creative-brand. Off by default.

Accepts true · falseDefault false

Label

Hierarchical facet label display: "leaf" renders only the deepest path segment (e.g. "Paid Search" instead of "Paid Media > Paid Search"); "full" renders the whole value (default).

Accepts full · leafDefault full

Zero-results class

Class applied while this filter has zero matching results.

Accepts e.g. is-empty

Click

What clicking an item in this filter group does - filter the results, navigate to a link, or nothing.

Accepts e.g. filter

Type

The control style of this filter group: checkbox, radio, select, range or toggle.

Accepts e.g. checkbox

Limit

How many filter items to show before the show-more trigger hides the rest.

Accepts min 1, whole numbers

Search mode

Set to "local" to match the filter-search input against already-loaded values instead of querying Algolia for facet values.

Accepts e.g. local

Show selected missing

Set to "true" to keep a selected value visible even when the latest results no longer contain it, so the user can still clear it.

Accepts e.g. true

Searchable

Required2 attributes
FieldRequired

Facet attribute to filter on (e.g. "tags").

Accepts e.g. tags

IndexRequired

Algolia index this filter group queries.

Accepts e.g. acme_blog_prod

Optional10 attributes
Debounce

Debounce (ms) before firing the SFFV typeahead query (default 200).

Accepts min 0, whole numbers

Display template

Empty-state message; supports {query} token.

Accepts e.g. Showing {shown} of {total}

Apply mode

Defer applying selections until a wf-algolia-button="apply" is clicked.

Accepts immediate · deferredDefault immediate

Match

Combine selected values with "or" (any match) or "and" (all match).

Accepts or · andDefault or

Zero-results class

Class applied while the SFFV result-set is empty.

Accepts e.g. is-empty

Click

What clicking an item in this filter group does - filter the results, navigate to a link, or nothing.

Accepts e.g. filter

Type

The control style of this filter group: checkbox, radio, select, range or toggle.

Accepts e.g. checkbox

Limit

How many filter items to show before the show-more trigger hides the rest.

Accepts min 1, whole numbers

Search mode

Set to "local" to match the filter-search input against already-loaded values instead of querying Algolia for facet values.

Accepts e.g. local

Show selected missing

Set to "true" to keep a selected value visible even when the latest results no longer contain it, so the user can still clear it.

Accepts e.g. true

Category list

Required2 attributes
FieldRequired

Facet attribute to filter on, e.g. "category".

Accepts e.g. category

IndexRequired

Algolia index this filter group queries.

Accepts e.g. acme_blog_prod

Optional9 attributes
Link template

URL template for leaf-item clicks in standalone (non-browse) filter groups.

Accepts e.g. /category/{value}

Slugify

Cleans the value into a URL-friendly slug before it goes into the link. Example: "Creative & Brand" becomes creative-brand. Off by default.

Accepts true · falseDefault false

Sort

Reorder the filter-items in this group. "alpha" sorts A→Z by the stored value (case-insensitive); "count" sorts by descending result count; "selected-first" floats checked values to the top; "selected-alpha-zero-last" floats selected items up, sorts the rest A→Z, and sinks zero-result values to the bottom; "natural" (default) keeps DOM order. Applied whenever results update - a dynamically-populated list briefly paints in the default count order until the first response sorts it.

Accepts natural · selected-first · alpha · count · selected-alpha-zero-lastDefault natural

Label

Hierarchical facet label display: "leaf" renders only the deepest path segment (e.g. "Paid Search" instead of "Paid Media > Paid Search"); "full" renders the whole value (default).

Accepts full · leafDefault full

Click

What clicking an item in this filter group does - filter the results, navigate to a link, or nothing.

Accepts e.g. filter

Type

The control style of this filter group: checkbox, radio, select, range or toggle.

Accepts e.g. checkbox

Limit

How many filter items to show before the show-more trigger hides the rest.

Accepts min 1, whole numbers

Search mode

Set to "local" to match the filter-search input against already-loaded values instead of querying Algolia for facet values.

Accepts e.g. local

Show selected missing

Set to "true" to keep a selected value visible even when the latest results no longer contain it, so the user can still clear it.

Accepts e.g. true

Required2 attributes
FieldRequired

Facet attribute to filter on, e.g. "category".

Accepts e.g. category

IndexRequired

Algolia index this filter group queries.

Accepts e.g. acme_blog_prod

Optional21 attributes
Match

Combine selected values with "or" (any match) or "and" (all match).

Accepts or · andDefault or

Value

Initial pre-selected facet value.

Accepts e.g. Shoes

Field label

Override the display heading shown above this filter group (heading-only).

Accepts e.g. Category

Text more

Label for the "show more" trigger.

Accepts e.g. Show more

Text less

Label for the "show less" trigger.

Accepts e.g. Show less

Apply mode

Defer applying selections until a wf-algolia-button="apply" is clicked.

Accepts immediate · deferredDefault immediate

Debounce

Override the global debounce (ms) for this group's inputs.

Accepts min 0, whole numbers

Facet

Dynamic facet field name. Alternative to wf-algolia-field for dynamically-loaded facet lists.

Accepts e.g. categories.lvl0

Group ID

Hierarchical group identifier; referenced by child groups via wf-algolia-refines.

Accepts e.g. category-lvl0

Refines

Names the parent group-id this filter cascades under: this group is a child whose options re-query scoped to the parent group’s current selection. Enables N-level hierarchical (cascading) filters.

Accepts e.g. category-lvl0

When parent empty

How this group behaves until its parent (wf-algolia-refines) has a selection: "hide" (hidden until the parent is picked) or "disable" (greyed/disabled until the parent is picked).

Accepts disable · hideDefault disable

Link template

URL template for leaf-item clicks in standalone (non-browse) filter groups.

Accepts e.g. /category/{value}

Slugify

Cleans the value into a URL-friendly slug before it goes into the link. Example: "Creative & Brand" becomes creative-brand. Off by default.

Accepts true · falseDefault false

Label

Hierarchical facet label display: "leaf" renders only the deepest path segment (e.g. "Paid Search" instead of "Paid Media > Paid Search"); "full" renders the whole value (default).

Accepts full · leafDefault full

Sort

Reorder the filter-items in this group. "alpha" sorts A→Z by the stored value (case-insensitive); "count" sorts by descending result count; "selected-first" floats checked values to the top; "selected-alpha-zero-last" floats selected items up, sorts the rest A→Z, and sinks zero-result values to the bottom; "natural" (default) keeps DOM order. Applied whenever results update - a dynamically-populated list briefly paints in the default count order until the first response sorts it.

Accepts natural · selected-first · alpha · count · selected-alpha-zero-lastDefault natural

Zero-results class

Class applied while this filter has zero matching results.

Accepts e.g. is-empty

Click

What clicking an item in this filter group does - filter the results, navigate to a link, or nothing.

Accepts e.g. filter

Type

The control style of this filter group: checkbox, radio, select, range or toggle.

Accepts e.g. checkbox

Limit

How many filter items to show before the show-more trigger hides the rest.

Accepts min 1, whole numbers

Search mode

Set to "local" to match the filter-search input against already-loaded values instead of querying Algolia for facet values.

Accepts e.g. local

Show selected missing

Set to "true" to keep a selected value visible even when the latest results no longer contain it, so the user can still clear it.

Accepts e.g. true

Elements inside it

These roles are placed inside this component, not on their own:

filter-group
├─ filter-field-text
├─ filter-group-count
├─ filter-search
├─ filter-search-results
│ ├─ filter-search-empty
│ └─ filter-search-result-template
├─ filter-selected-count
│ └─ filter-count-text
├─ filter-selected-value
│ └─ filter-value-text-target
├─ filter-show-more
├─ filter-template
│ ├─ filter-count
│ ├─ filter-item
│ └─ filter-value-text
├─ range-display
├─ range-max
├─ range-min
└─ scope-facet
  • — Element written with the group's field name / heading.
  • — Element written with the number of results matching this group.
  • — Typeahead input inside a filter group - SFFV by default, client-side when wf-algolia-search-mode="local".
  • — Overlay container holding the typeahead results for a filter-search input.
    • — Empty-state element shown when the typeahead returns no values.
    • — Row template cloned once per typeahead result.
  • — Outer element reflecting how many values are selected in this group; the number is written into its filter-count-text child.
    • — The write target inside a filter-selected-count wrapper.
  • — Outer element reflecting the selected value(s) of this group; the text is written into its filter-value-text-target child.
    • — The write target inside a filter-selected-value wrapper.
  • — The show-more / show-less trigger revealing items past wf-algolia-limit.
  • — Row template inside a filter group, detached at scan time and cloned once per facet value.
    • — Element written with the facet value's result count.
    • — The clickable/checkable row itself within a cloned filter template.
    • — Element written with the facet value's display label.
  • — Element written with the formatted current range.
  • — Upper-bound input of a range filter group.
  • — Lower-bound input of a range filter group.
  • — Marks a cloned subtree as scoped to one facet value, so descendants resolve their scope via closest().