X Enterprises
Table

TableFilterChips

Animated chips for active filters with a remove-X and Clear-all control.

TableFilterChips

Renders a horizontal row of pill chips — one per active filter — showing the filter label, value, and a small × to remove that filter. A "Clear all" link appears once more than one filter is active. The whole row animates via <TransitionGroup> so chips fade/scale in and out.

Components

<XATableFilterChips />

<XATableFilterChips
  :filters="{ status: 'active', role: 'admin', search: 'jane' }"
  :labels="{ status: 'Status', role: 'Role' }"
  @remove="(key) => removeFilter(key)"
  @clear="clearAllFilters"
/>

Props

PropTypeDefaultDescription
filtersRecord<string, unknown>requiredActive filter values. Keys with null / undefined / empty-string values are hidden.
labelsRecord<string, string>{}Pretty labels per filter key. Keys missing from labels are auto-derived from the camelCase/snake_case key (e.g., firstNameFirst Name).

Emits

EventPayloadDescription
remove(key: string)User clicked the × on a chip.
clear()User clicked "Clear all". Only emitted when more than one filter is active.

Value formatting

Built-in display formatters:

ValueDisplay
trueYes
falseNo
DatetoLocaleDateString()
Arraycomma-separated list
OtherString(value)

AI Context

component: XATableFilterChips
package: "@xenterprises/nuxt-x-app"
category: Table
use-when: >
  Below XATableFilterBar to show what filters are currently applied and let
  users drop them one at a time without re-opening the filter row.
auto-label: "camelCase keys are split and title-cased when no label is provided"
Copyright © 2026