Facet or RefinementList Title

I’ve been searching all through the Algolia docs and code examples, and I can’t seem to find the answer to…

How do I provide the title for a “facet list”? For instance…if I have a “facet attribute” of “manufacturerName” (which is the indexed property name…but I want in the UI to display this facet grouping under the title “Manufacturer” … how do I do that?

Hmm… I don’t see anything documented either! For my Autocomplete interface, I was able to create a header template, but I’m not sure if the refinementList widget support this template type. Here’s what it looks like for my autocomplete if you want to try it though:

        templates: {
          header({ items, state, Fragment }) {
            if (items.length === 0 || state.query === '') {
              return null;

            return (
                <span className="aa-SourceHeaderTitle">
                <div className="aa-SourceHeaderLine" />

1 Like

Yeah…I was hoping to create a dynamic UI based on the index data. In the React Hooks e-commerce example a specific Panel is created and wrapped around a Refinement list.

                <Panel header="Brands">
                    searchablePlaceholder="Search for brands…"

Note that the facet property is brand while the “title” of that facet in the UI is “Brands”.

I was hoping to do something as simple as what’s in the NextJS example:

            <DynamicWidgets fallbackComponent={FallbackComponent} />

That just pre-renders all the facets I have defined in my Algolia dashboard, but as mentioned…it just defaults a title for each facet to be the indexed property name (which is not always a “user friendly” and properly capitalized name)