How to filter content by multiple taxonomy terms at once (checkbox selection)?

I have a Hugo site where each content file (e.g. cars/*.md) has a taxonomy value class such as SUV, Sedan, Hatchback, etc.

I’m already using Hugo’s taxonomy pages to display all cars by one class (e.g. /class/suv/ shows all SUVs). On my page I list all available classes with checkboxes. When a user clicks on one class, I redirect to the taxonomy page for that class, and it works fine.

What I want now is: if a user selects multiple checkboxes (for example SUV and Sedan), I’d like to show all cars that belong to any of those selected classes. Basically merge multiple taxonomy values in the filter.

Is there a built-in way in Hugo to filter content by multiple taxonomy terms (OR condition), or do I need to build a custom list page with where clauses?

Any examples or best practices would be appreciated.

Which is something that happens dynamically on the client. Whereas Hugo generates static pages. So: No, you can’t do that with Hugo short of creating pages for all possible combinations of checkboxes.

Which, depending on the number of terms, might result in a lot of pages.

Alternatively, you could use JavaScript: Create a single page for all classes and turn on/off the ones with JS depending on what the user selected.