Filter Notice

Filter Notice is a copy-paste React component that stops thought data was missing behind a filter before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/filter-notice
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsThought data was missing behind a filter

Was this component page useful?

How do I install Filter Notice?

pnpm dlx shadcn@latest add @bollard/filter-notice

The files land in your project. They're yours to edit.

How do I use Filter Notice in React?

filter-notice-usage.tsx
import { FilterNotice, hiddenByEach } from "@/components/ui/filter-notice"

<FilterNotice
  total={invoices.length}
  shown={visible.length}
  filters={filters.map((filter) => ({ id: filter.id, label: filter.label, hides: hides[filter.id] }))}
  hiddenSelected={hiddenSelected}
  formatCount={(count) => `${count} ${count === 1 ? "invoice" : "invoices"}`}
  onRemoveFilter={(id) => setActive((list) => list.filter((item) => item !== id))}
  onClearAll={() => setActive([])}
/>

What input mistakes does Filter Notice catch?

  • Items hidden by active filters, counted
  • Which filter hides the most, per chip
  • Selected items that are currently hidden

What props does Filter Notice accept?

FilterNotice props
PropTypeDefault
total* (required)

Items before any filter or search.

number—
shown* (required)

Items visible now.

number—
filters* (required)

Active filters and search terms, one chip each.

ActiveFilter[]—
onRemoveFilter* (required)

Remove one filter.

(id: string) => void—
onClearAll* (required)

Remove every filter and the search.

() => void—
hiddenSelected

Selected items that the filters now hide, so a bulk action wouldn't visibly include them.

number0
formatCount

"23 items". Override to name your rows or translate.

(count: number) => stringdefaultCount
message

Templates: `{hidden}`, `{shown}`, `{total}` (formatted counts) and `{filters}` ("2 filters") are filled in.

string"{hidden} hidden by {filters} · showing {shown} of {total}"
emptyText

Shown when filters hide every item.

string"Nothing matches. {hidden} hidden by {filters}."
hiddenSelectedText

`{count}` is the number of hidden selected items.

string"{count} selected {verb} hidden by these filters and not …
clearAllLabel

Text for the clear-all button.

string"Clear all"
removeLabel

Accessible label prefix for remove buttons.

string"Remove filter"

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Filter Notice accessible?

  • A role="region" labelled "Active filters"
  • Counts and warnings are aria-live="polite"
  • Filter chips are a labelled list; remove buttons name the filter

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Counts come from your props; it doesn't compute them
  • Per-filter counts are what each filter hides on its own, so they can add up to more than the total hidden

What expensive mistakes does Filter Notice stop?

Thought data was missing behind a filter

Also known as

filters · filter chips · data table · bulk action · search results · clear filters · hidden rows · admin table

What dependencies does Filter Notice require?

Filter Notice facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameFilter Notice
Registry identifier@bollard/filter-notice
Install commandnpx shadcn@latest add @bollard/filter-notice
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Filter Notice

What form validation mistake does Filter Notice catch?

Filter Notice prevents thought data was missing behind a filter. Says how many items active filters hide and which filter hides what, so people don't think data is missing or bulk-act on a partial set. Catches: Items hidden by active filters, counted, Which filter hides the most, per chip, Selected items that are currently hidden. Limitation: validate filter-notice schemas on backend.

How do I install filter-notice with shadcn?

Run `npx shadcn@latest add @bollard/filter-notice`. Sources added: registry/default/filter-notice/filter-notice.tsx. Package requirements: lucide-react.

What props customize Filter Notice?

Filter Notice accepts `total`, `shown`, `filters`, `onRemoveFilter`, `onClearAll`. Configures filters, filter chips, data table behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of filter-notice?

Counts come from your props; it doesn't compute them. Per-filter counts are what each filter hides on its own, so they can add up to more than the total hidden Server requirement: backend verification for filter-notice.

How does Filter Notice meet accessibility guidelines?

A role="region" labelled "Active filters". Counts and warnings are aria-live="polite". Filter chips are a labelled list; remove buttons name the filter. Minimizes errors: filter hiding results, bulk delete on filtered list.

Which components pair with Filter Notice?