Active trigger
.is-active + badge when filters applied.
Filter trigger with elevated popover, field grid, and removable active chips.
Live
<div class="ui-filter is-open">
<button type="button" class="btn btn-compact btn-with-icon ui-filter__trigger is-active"
aria-expanded="true" aria-haspopup="dialog" aria-label="Filters, 2 active">
<span class="ui-icon ui-icon--filter btn-icon" aria-hidden="true"></span>
<span class="ui-filter__badge" aria-hidden="true">2</span>
</button>
</div>
<div class="ui-filter__popover" role="dialog" aria-label="Filters">…</div>
<div class="ui-filter-chips">
<button type="button" class="ui-filter-chip">Submitted …</button>
</div>
import { Filter, FilterField, FilterChips, FilterChip, Select, Button } from 'caustica-design/core'
import 'caustica-design/css'
<Filter
open={open}
onOpenChange={setOpen}
activeCount={2}
triggerLabel="Filters, 2 active"
popoverLabel="Filters"
footer={
<>
<Button variant="ghost" compact>Reset</Button>
<Button variant="primary" compact>Apply</Button>
</>
}
>
<FilterField label="Status">
<Select value={status} options={…} onChange={setStatus} aria-label="Status" />
</FilterField>
</Filter>
<FilterChips>
<FilterChip onClick={…}>Submitted</FilterChip>
</FilterChips>
.is-active + badge when filters applied.
.ui-filter__field--full spans the grid.
Active filter summary outside the popover.
role="dialog" with aria-label / popoverLabel.| Class | Description |
|---|---|
.ui-filter / .is-open |
Root + open state. |
.ui-filter__trigger / .is-active |
Compact filter button. |
.ui-filter__badge |
Active count badge. |
.ui-filter__popover |
Elevated dialog panel. |
.ui-filter__fields / __field / --full |
Field grid. |
.ui-filter__label / __footer |
Field label + footer actions. |
.ui-filter-chips / .ui-filter-chip |
Active chip row + chip button. |
From src/core/Filter.tsx — Filter, FilterField, FilterChip, FilterChips.
| Prop | Type | Default | Description |
|---|---|---|---|
open / onOpenChange |
boolean / fn |
— | Controlled open state (required). |
triggerLabel / popoverLabel |
string |
— | Accessible names (required). |
activeCount |
number |
0 |
Badge count; 0 hides badge. |
footer / children |
ReactNode |
— | Footer actions + field content. |
full / label |
boolean / ReactNode |
— | FilterField span + label. |