FilterChip
FilterChip is a button that removes an applied filter. Use it in a row of applied filters chosen in a menu or panel. For passive metadata use Badge, and for a condition the user edits use FilterCondition.
- Clicking the label or × removes the filter. It never opens an editor or toggles a choice.
- Give it a full
aria-label, such as "Remove status filter: Paid". - Your app owns the filter values. After removal, move focus to the next chip, the previous chip or a stable filter control.
- Long labels truncate on screen but keep their full accessible name.
- It has one compact size that follows the density setting.
Installation
Run npx nxds-cli@latest init first if nxds isn’t set up in your app yet. See Install.
Usage
Props
FilterChip
| Prop | Type | Default | Description |
|---|---|---|---|
aria-labelRequired | string | No default documented | Names the action, field and full value, such as "Remove status filter: Active". |
FilterChip is a button that removes an applied filter. Use it in a row of applied filters chosen in a menu or panel. For passive metadata use Badge, and for a condition the user edits use FilterCondition.
- Clicking the label or × removes the filter. It never opens an editor or toggles a choice.
- Give it a full
aria-label, such as "Remove status filter: Paid". - Your app owns the filter values. After removal, move focus to the next chip, the previous chip or a stable filter control.
- Long labels truncate on screen but keep their full accessible name.
- It has one compact size that follows the density setting.
Installation
Install these components first:
Copy and paste the following code into your project.
components/filter-chip/FilterChip.vue components/filter-chip/index.ts Keep each file at the path shown above it.
Paths are relative to
packages/vue/src/. Keep the same folders under your@/root, and the imports between files work without edits.
Usage
Props
FilterChip
| Prop | Type | Default | Description |
|---|---|---|---|
ariaLabelRequired | string | No default documented | Names the action, field and full value, such as "Remove status filter: Active". |