Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

More than three filters

Only the first three filters stay in the row; the rest wait behind one Filters button.

Six facets, three inline
Ana RaoRaj MehtaIsha Nair
Filters
Filters
SalesSupportFinanceLegal
Show code
<app-filter-bar inline="3">
    <app-filter-facet key="status" … />   six facets: the first three stay in the row
</app-filter-bar>

Floating panel

A panel holds every filter behind one button, and each change applies at once with no Apply step.

Facets in a floating panel
Show code
<app-filter-bar floating>
    <app-filter-facet key="status" label="Status" type="AppFilterFacetType.Enum">…</app-filter-facet>
    <app-filter-facet key="owner" label="Owner" type="AppFilterFacetType.MultiEnum">…</app-filter-facet>
    <app-filter-facet key="due" label="Due date" type="AppFilterFacetType.DateRange" />
    <app-filter-facet key="q" label="Search invoices" type="AppFilterFacetType.Text" />
</app-filter-bar>

Name the first choice

allLabel renames the All segment, so the first choice says exactly what it clears.

Renaming the All segment
Show code
<app-filter-bar>
    <app-filter-facet key="payment" label="Payment" type="AppFilterFacetType.Enum" all-label="All payments">
        <app-filter-option value="Paid" label="Paid" />
        <app-filter-option value="Unpaid" label="Unpaid" />
    </app-filter-facet>
</app-filter-bar>

Date presets

Quick ranges fill both dates of a date filter in one tap, and the filter applies at once.

Quick ranges on a date filter
Show code
<app-filter-bar>
    <app-filter-facet key="due" label="Due date" type="AppFilterFacetType.DateRange" presets="today,last7Days,thisMonth" />
</app-filter-bar>

A required filter

A required filter always holds one of its choices, with no All segment and no chip to clear it.

Required period and status
Show code
<app-filter-bar>
    <app-filter-facet key="period" label="Period" type="AppFilterFacetType.Enum" required="true">
        <app-filter-option value="7" label="7 days" />
        <app-filter-option value="30" label="30 days" />
        <app-filter-option value="90" label="90 days" />
    </app-filter-facet>
    <app-filter-facet key="progress" label="Status" type="AppFilterFacetType.Enum">…</app-filter-facet>
</app-filter-bar>

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.

useListQuery with a table
Ana RaoRaj MehtaIsha Nair
Filters
Filters
InvoiceStatusOwnerDue
INV-1001OpenAna Rao2026-09-01
INV-1002OverdueRaj Mehta2026-10-08
INV-1003PaidIsha Nair2026-11-15
INV-1004OpenAna Rao2026-09-22
INV-1005OverdueRaj Mehta2026-10-01
INV-1006PaidIsha Nair2026-11-08
INV-1007OpenAna Rao2026-09-15
INV-1008OverdueRaj Mehta2026-10-22

42 invoices match, showing the first 8. The address bar carries the same filters.

Show code
<app-table-toolbar>
    <app-table-toolbar-filters>
        <app-filter-bar>
            <app-filter-facet key="status" label="Status" type="AppFilterFacetType.Enum">
                <app-filter-option value="Open" label="Open" />
                <app-filter-option value="Overdue" label="Overdue" />
                <app-filter-option value="Paid" label="Paid" />
            </app-filter-facet>
            <app-filter-facet key="owner" label="Owner" type="AppFilterFacetType.MultiEnum">…</app-filter-facet>
            <app-filter-facet key="due" label="Due date" type="AppFilterFacetType.DateRange" />
            <app-filter-facet key="q" label="Search invoices" type="AppFilterFacetType.Text" />
        </app-filter-bar>
    </app-table-toolbar-filters>
</app-table-toolbar>
<app-data-table>…rows filtered by the page model…</app-data-table>

Apply before filtering

A search box and a date range wait for Apply, or Enter in the search box, before they change the list.

Search and date range with Apply
Show code
<app-filter-bar>
    <app-filter-facet key="q" label="Search invoices" type="AppFilterFacetType.Text" />
    <app-filter-facet key="due" label="Due date" type="AppFilterFacetType.DateRange" />
</app-filter-bar>

Facet labels

Each inline filter can show its label above its control; the folded Filters panel always shows labels.

Labels above the inline filters
Show code
<app-filter-bar facet-labels="true">
    <app-filter-facet key="labelStatus" label="Status" type="AppFilterFacetType.Enum">…</app-filter-facet>
    <app-filter-facet key="labelQuery" label="Search invoices" type="AppFilterFacetType.Text" />
</app-filter-bar>

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.

Counts and icons on a two-option facet
Show code
<app-filter-bar>
    <app-filter-facet key="vote" label="Feedback" type="AppFilterFacetType.Enum">
        <app-filter-option value="up" label="Helpful" count="2" icon="thumbs-up" />
        <app-filter-option value="down" label="Not helpful" count="9" icon="thumbs-down" />
    </app-filter-facet>
</app-filter-bar>

Every option

Every value of every prop, one cell each.

facets

type="enum"
type="multiEnum"
Ana RaoRaj MehtaIsha Nair
type="dateRange"
type="text"

required

required: an enum that always holds one option, no All segment, no chip

presets

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 bar

onChange

onChange(key, value): React only, Razor submits the GET form

inline

inline="0"
Filters
Filters
Ana RaoRaj MehtaIsha Nair
inline="2"
Ana RaoRaj MehtaIsha Nair
Filters
Filters
inline="3" (default)
Ana RaoRaj MehtaIsha Nair
Filters
Filters
inline="4"
Ana RaoRaj MehtaIsha Nair
inline="6"
Ana RaoRaj MehtaIsha Nair

floating

floating (default): omitted
Ana RaoRaj MehtaIsha Nair
Filters
Filters
floating

apply

apply: React only, Razor holds search and dates for Apply
Ana RaoRaj MehtaIsha Nair
Filters
Filters

action

action omitted (default): the current page
action="/Components/AppFilterBar#every-option"

size

size="sm" (default)
Ana RaoRaj MehtaIsha Nair
Filters
Filters
size="md"
Ana RaoRaj MehtaIsha Nair
Filters
Filters

className

className: React only, Razor takes class

clear-all-label

clear-all-label="Clear everything": shows once a filter is set

filters-label

filters-label="More filters"
Ana RaoRaj MehtaIsha Nair
More filters
More filters

filters-active-label

filters-active-label="{count} on": shows once a filter is set
Ana RaoRaj MehtaIsha Nair
Filters
Filters

keep-open-label

keep-open-label="Hold open": in the floating panel

applies-at-once-text

applies-at-once-text="Saved as you go": in the floating panel

apply-label

apply-label="Search now"
Ana RaoRaj MehtaIsha Nair
Filters
Filters

any-label

any-label="Anyone"
Ana RaoRaj MehtaIsha Nair
Filters
Filters

remove-chip-label

remove-chip-label="Remove {facet} {value}": shows once a filter is set

date-from-text

date-from-text="After {date}": shows once a start date is set

date-until-text

date-until-text="Before {date}": shows once an end date is set

date-range-text

date-range-text="{from} until {to}": shows once both dates are set

Guidance

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.

status, owner, due date, search six facets (overflow) status only three selects share a row six statuses (becomes a select)
0 2 3 4 6
sm md
off on
current page current page, back to the playground
Ana RaoRaj MehtaIsha Nair
React, generated from the controls
<AppFilterBar facets={facets} value={query.filters} onChange={setFilter} inline={4} />
Razor, the same props
<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

PropTypeDefaultDescription
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

PropTypeDefaultDescription
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.