Modify StandardFacet label

Hello Team,

I would like to ask if how we can modify the Facet filter label by adding counter (6) beside the current label like this one. Last resort I can think of is to tweak it on CSS or injecting an element by targeting the CSS class. Is there any other convenient way? Thanks in advance,

image

Hello @Allen_Gatmaitan

you can use showOptionCounts with value “true” value for displaying the numbers with label.

Just to share, now there is the latest component of Standardfacet is available ( StandardFacet | Hitchhikers ) impoved than the last one which has been Deprecated. (StandardFacets (Deprecated) | Hitchhikers)
For reference: @storybook/cli - Storybook

Hope it helps.

Hi @Tosh_B . Thank you for your quick respond!

Yes, I’m using the latest StandardFacet | Hitchhikers not the deprecated one.

And also sorry for the little confusion, I’m referring to the Label of the whole facet set, not the options list which I believe showOptionCounts is for options list label upon trying.
image

I’m trying to put the selected count of filters options beside the facet label.

Hi @Allen_Gatmaitan
Apologize for delay and Thank you for clear this out here. As for the solution, using showOptionCounts should work indeed by putting the count of selection.