Skip to main content

Shared Props

Many facet families share the same logic even when their markup is different. The most important distinction is whether a prop belongs to the parent facet or to an authored option.

Parent Facet Props

These props apply to Select, SearchSelect, Radio List, and Checkbox List through FacetQueryProperties. Search Facet has matching props implemented in its own component file.

PropApplies toWhy it matters
targetAll facet controlsConnects the control to the Facet Target with the same target ID.
argument_modeSearch and option facets when target_multiple_query_arguments is falseChooses the single query mode.
target_multiple_query_argumentsSearch and option facetsSwitches from one query target to multi-argument behavior.
options_behaviorSelect, SearchSelect, Radio List, Checkbox ListControls unavailable option behavior after availability data changes.
show_countsSelect, SearchSelect, Radio List, Checkbox ListEnables dynamic result counts on options.
selection_modeSelect and SearchSelectChooses single or multiple selected values.
aria_labelRadio List and Checkbox ListNames the radiogroup or group for assistive technology.
default_labelSelect and SearchSelectText shown when nothing is selected, and the built-in clear item label for Select.
placeholderSearch and SearchSelectText shown in the input before a value is typed.

Single-Argument Groups

When target_multiple_query_arguments is false, the selected argument_mode decides which group is active:

GroupActive whenRequired values
default_query_argumentargument_mode is defaultfacet_key
meta_argumentargument_mode is metameta_key, meta_compare, meta_type
taxonomy_argumentargument_mode is taxtaxonomy, tax_field
date_argumentargument_mode is datecolumn
acf_relationship_argumentargument_mode is acf_relationshipmeta_key

Multi-Argument Parent Props

When target_multiple_query_arguments is true, the parent facet uses query_argument_mappings.

Each row needs:

PropMeaning
mapping_keyStable row key referenced by option value mappings.
argument_modeQuery mode for this mapped row.
facet_keyUsed when row mode is default.
meta_key, meta_compare, meta_typeUsed when row mode is meta.
taxonomy, tax_fieldUsed when row mode is tax.
columnUsed when row mode is date.

For Search Facet, the typed input becomes the value for every mapped row. For option facets, each option supplies its own values through query_value_mappings.

Option Props

Select, SearchSelect, Radio List, and Checkbox List option components share these concepts:

PropApplies toMeaning
content.valueSingle-argument option modeValue sent when the option is selected.
content.labelAll option modesVisible label and count base text.
metadataAll option modesOptional key/value rows serialized for custom JavaScript integrations.
query_value_mappingsMulti-argument option modePer-option values keyed by parent mapping_key.
disabledAll option familiesPrevents authored selection.
is_defaultSelect, Radio List, Checkbox ListMarks initial selection when no URL or runtime value already exists.
used_with_multiple_argumentsOption componentsShows mapping-driven authoring instead of manual content.value.
count_displayOption componentsChooses inline count text or a separate count span.

used_with_multiple_arguments is an authoring switch for option components. It should match the parent facet's multi-argument setup: enable it when the parent has target_multiple_query_arguments enabled and the option needs query_value_mappings.

Count Display

count_display supports:

ValueBehavior
inlineRuntime appends counts to the visible label text.
spanRuntime writes counts into a separate data-ome-facet-option-count span.

Use span when the count needs separate styling or layout. The PHP components include Etch preview count props for span mode so authors can style the counter before runtime data exists.

Reset Props

Radio List has built-in reset props:

PropMeaning
show_reset_optionAdds a reset choice before authored options.
reset_option_modeRenders the reset choice as radio-style or button-style.
reset_labelLabel for the built-in reset choice.

Reset Facet is a separate component. It clears all controls for the target rather than only one radio list selection.