On this page
@addTagHelper *, Webority.Ui.RazorMore than three filters
Only the first three filters stay in the row; the rest wait behind one Filters button.
Floating panel
A panel holds every filter behind one button, and each change applies at once with no Apply step.
Name the first choice
allLabel renames the All segment, so the first choice says exactly what it clears.
Date presets
Quick ranges fill both dates of a date filter in one tap, and the filter applies at once.
A required filter
A required filter always holds one of its choices, with no All segment and no chip to clear it.
A whole list
Page, sort and filter live in the address bar, and a new request cancels the one still running. Clear all is one link and Apply one form submit, so the page address changes once; there is no per-key callback to batch.
| Invoice | Status | Owner | Due |
|---|---|---|---|
| INV-1001 | Open | Ana Rao | 2026-09-01 |
| INV-1002 | Overdue | Raj Mehta | 2026-10-08 |
| INV-1003 | Paid | Isha Nair | 2026-11-15 |
| INV-1004 | Open | Ana Rao | 2026-09-22 |
| INV-1005 | Overdue | Raj Mehta | 2026-10-01 |
| INV-1006 | Paid | Isha Nair | 2026-11-08 |
| INV-1007 | Open | Ana Rao | 2026-09-15 |
| INV-1008 | Overdue | Raj Mehta | 2026-10-22 |
42 invoices match, showing the first 8. The address bar carries the same filters.
Apply before filtering
A search box and a date range wait for Apply, or Enter in the search box, before they change the list.
Facet labels
Each inline filter can show its label above its control; the folded Filters panel always shows labels.
Counts and icons
An option can show a count and an icon in its segment. A facet drawn as a select shows neither. Counts follow a server table: render the bar again in the rows fragment as a <template data-wui-filters> and name its region with filters-region.
Every option
Every value of every prop, one cell each.
facets
type="enum"type="multiEnum"type="dateRange"type="text"required
required: an enum that always holds one option, no All segment, no chippresets
presets="today"presets="last7Days"presets="thisMonth"presets="lastMonth"presets="thisFinancialYear"all-label
all-label (default): "All"all-label="All payments"value
value={{ status: "Open" }}: React only, Razor reads the address baronChange
onChange(key, value): React only, Razor submits the GET forminline
inline="0"inline="2"inline="3" (default)inline="4"inline="6"floating
floating (default): omittedfloatingapply
apply: React only, Razor holds search and dates for Applyaction
action omitted (default): the current pageaction="/Components/AppFilterBar#every-option"size
size="sm" (default)size="md"className
className: React only, Razor takes classclear-all-label
clear-all-label="Clear everything": shows once a filter is setfilters-label
filters-label="More filters"filters-active-label
filters-active-label="{count} on": shows once a filter is setkeep-open-label
keep-open-label="Hold open": in the floating panelapplies-at-once-text
applies-at-once-text="Saved as you go": in the floating panelapply-label
apply-label="Search now"any-label
any-label="Anyone"remove-chip-label
remove-chip-label="Remove {facet} {value}": shows once a filter is setdate-from-text
date-from-text="After {date}": shows once a start date is setdate-until-text
date-until-text="Before {date}": shows once an end date is setdate-range-text
date-range-text="{from} until {to}": shows once both dates are setGuidance
What to do, and what to avoid.
Use it when
- A server-paged list that people filter, share and reload.
- Several kinds of filter (one choice, many choices, a date range, free text) that should look the same everywhere.
Reach for something else when
- The whole list is already in the browser. → usePagination with a hand-wired AppSegmented or AppSearch
- One short exclusive choice and nothing else. → AppSegmented
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
<AppFilterBar facets={facets} value={query.filters} onChange={setFilter} inline={4} />
<app-filter-bar inline="4">
<app-filter-facet key="pgStatus" label="Status" type="Enum">
<app-filter-option value="Open" label="Open" />
…
</app-filter-facet>
<app-filter-facet key="pgOwner" label="Owner" type="MultiEnum">
<app-filter-option value="ana" label="Ana Rao" />
…
</app-filter-facet>
<app-filter-facet key="pgDue" label="Due date" type="DateRange" />
<app-filter-facet key="pgQ" label="Search invoices" type="Text" />
</app-filter-bar>
22 props. The 2 most used come first.
Used on most screens 2 props
| Prop | Type | Default | Description |
|---|---|---|---|
| inlinedefault 3 | int | 3 | How many facets stay in the row; the rest fold into the Filters button. |
| floatingdefault false | bool | false | A floating panel: hover, click or F opens the facets in a non-modal panel under the Filters button, with a chip summary in the row. |
Less common 20 props
| Prop | Type | Default | Description |
|---|---|---|---|
| facet-labelsdefault false | bool | false | Draws each inline facet's label above its control. The folded Filters panel always shows labels. |
| actiondefault the current page | string | the current page | Where the form posts and where the chips and Clear all link. React has no counterpart: its callback replaces the form. |
| app-filter-facetdefault - | child | - | One filter. key is the query param (dueFrom and dueTo for a dateRange), label names the control and is its placeholder, type is enum, multiEnum, dateRange or text. |
| all-labeldefault All | string | All | Text of the segment that clears an enum facet, e.g. "All payments". Names the segment only: a facet with four or more options shows as a select, which has no such choice. Another type throws. |
| presetsdefault - | string | - | Quick ranges for a dateRange facet. |
| clear-all-labeldefault Clear all | string | Clear all | Replaces the built-in English text, for other languages. |
| filters-labeldefault Filters | string | Filters | Replaces the built-in English text, for other languages. |
| filters-active-labeldefault Filters, {count} active | string | Filters, {count} active | Replaces the built-in English text, for other languages. {count} is the number of active filters. |
| keep-open-labeldefault Keep open | string | Keep open | Replaces the built-in English text, for other languages. |
| applies-at-once-textdefault Changes apply at once. | string | Changes apply at once. | Replaces the built-in English text, for other languages. |
| apply-labeldefault Apply | string | Apply | Replaces the built-in English text, for other languages. |
| any-labeldefault Any | string | Any | Replaces the built-in English text, for other languages. |
| remove-chip-labeldefault Remove {facet} filter {value} | string | Remove {facet} filter {value} | Replaces the built-in English text, for other languages. {facet} is the facet label and {value} the chip text. |
| date-range-textdefault {from} to {to} | string | {from} to {to} | Replaces the built-in English text, for other languages. {from} and {to} are the start and end dates of a date range chip. |
| date-from-textdefault From {date} | string | From {date} | Replaces the built-in English text, for other languages. {date} is the start date of a date range chip. |
| date-until-textdefault Until {date} | string | Until {date} | Replaces the built-in English text, for other languages. {date} is the end date of a date range chip. |
| app-filter-optiondefault - | child | - | A choice of an enum or multiEnum facet: value is what posts, label what the person reads. An enum shows as segments (with an All segment) up to three options and as a clearable select beyond that. |
| countdefault - | int | - | A number drawn in the option's segment. Only an enum facet drawn as segments shows it. |
| icondefault - | string | - | A library icon name drawn in the option's segment. Only an enum facet drawn as segments shows it. |
| sizedefault sm | sm | md | sm | Control height. md draws every control and button at the 36px field height; sm is the compact toolbar height. |
Screen reader
4 notes- Every facet control is named by its facet label.
- The Filters button reports whether its panel is open and which panel it controls, and its name carries the number of active filters.
- The floating panel has the dialog role named Filters and closes on Escape or a click outside.
- With apply, Enter in a search box applies the held edits.