Skip to main content

Facet sidebar

The filter column with facets, applied filters and Clear all.

<mm-facet-sidebar>
<mm-facet name="type" label="Type"
options='[{"value":"table","label":"Table","count":4812,"icon":"table"},{"value":"topic","label":"Topic","count":382,"icon":"stream"}]'></mm-facet>
<mm-facet name="provider" label="Provider"
options='[{"value":"snowflake","label":"Snowflake","count":2904,"provider":"snowflake"}]'></mm-facet>
</mm-facet-sidebar>

Guidance​

The Discover filter column: a "Filters" heading with "Clear all", a summary of applied filters as removable pills, then one mm-facet per facet (Type, Provider, Tags, Owner). Facets are separated by hairlines and spacing, never cards. Any change fires one mm-filter-change with every facet's selection, ready to put in the URL or the search request.

The column is a labelled region. Removing an applied pill moves focus to the next pill, or to the heading when none are left, so focus is never lost.

Properties​

PropertyAttributeTypeDefaultDescription
headingheadingstring''Heading text. Defaults to "Filters".
hideAppliedhide-appliedbooleanfalseHides the applied-filters summary when another place already shows it, such as mm-search-bar tokens.
facetElementsMmFacet[]The facets, in order.
facetsRecord<string, string[]>Every facet's selection, keyed by facet name.

Methods​

MethodDescription
clearAll()Clears every facet and fires one mm-filter-change.

Events​

EventDetailDescription
mm-filter-changeCustomEvent<MmFilterChangeDetail>Any facet's selection changed by user action.

Slots​

SlotDescription
Defaultmm-facet elements.
footerAnything after the facets, such as a "Save as view" button.

CSS parts​

PartDescription
headingThe "Filters" heading.
clear-allThe "Clear all" button.
appliedThe applied-filters summary.

Examples​

Every state of mm-facet-sidebar in Storybook, with keyboard and screen reader tests.