v0.0.2
Demos (demo panel, opens in a new tab)

Active filters

A strip above a list that shows the filters in use and lets users remove them one by one.

zb:filter-context zubazar/ui-pro

PRO

This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →

Basic usage

Basic usage: view
BLADE

filters is a key => text array; remove adds an X to each chip and clear adds a "Clear all" button.

blade
<zb:filter-context
    :filters="['status' => 'Status: Shipped', 'date' => 'October 2026', 'store' => 'Store: Downtown']"
    remove="removeFilter"
    clear="clearFilters"
    :count="1250"
/>
PropValues
filterskey => text
removeThe method that removes one filter
clearThe method that clears them all
countNumber of results

Props

The values the component takes. What are props and slots?

PropTypeDefaultDescription
filters—[]The filters in use: key => text
remove—nullThe Livewire method that removes a filter (called with its key)
clear—nullThe Livewire method that clears every filter
count—nullThe number of results with these filters

Developer notes

Events, hooks and details
  • With no filters it renders nothing; the filters and the methods are the application's.
  • The remove method is called with the filter's key; count writes the number of results in the page's number format.