All button for category refinement list

I’m trying to do something which I believe is simple, but I just can’t figure out how to do it. Basically, I’m trying to recreate the search tabs from the Algolia site: Search | Algolia. Specifically, I’m trying make the “All” tab, along with the other category tabs. I can do the regular category tabs and use isRefined to determine if they are selected or not, but I’m not sure how to do an “All” tab and have that be selected when no other tabs are isRefined == true. Do I pass in a data object to a template, and loop through the data object? I can’t find anything in the help docs or in here that help at all. Thanks in advance!