
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-filters-header
Advanced tools
A set of URL-param-driven filter components for React apps — text input, select, multi-select, boolean toggle, search-select, and date input. Zero UI-framework dependencies.
react-filters-header is a lightweight React filter bar that keeps filter values in URL query params.
For a full visual user guide with live examples, styling ideas, and implementation patterns, visit:
If you get stuck, start from this guide first and compare your implementation with the live examples.
Use one component (FiltersHeader) and pass a filters array.
It supports:
text_input)select_input)multiselector)boolean)search_select)date_input)npm install react-filters-header
Also import styles once:
import 'react-filters-header/dist/index.css';
Peer dependency:
react >= 17
Yes, it works with Next.js.
FiltersHeader inside a Client Component ('use client').app/layout.tsx or pages/_app.tsx):
import 'react-filters-header/dist/index.css';import { useState } from 'react';
import { FiltersHeader, type FilterConfig } from 'react-filters-header';
import 'react-filters-header/dist/index.css';
export default function Example() {
const [assigneeSearch, setAssigneeSearch] = useState('');
const filters: FilterConfig[] = [
{
name: 'q',
label: 'Search',
type: 'text_input',
placeholder: 'Search tickets',
},
{
name: 'status',
label: 'Status',
type: 'select_input',
options: [
{ label: 'Open', name: 'open' },
{ label: 'Closed', name: 'closed' },
],
},
{
name: 'tags',
label: 'Tags',
type: 'multiselector',
options: [
{ label: 'Bug', name: 'bug' },
{ label: 'Feature', name: 'feature' },
],
},
{
name: 'archived',
label: 'Archived',
type: 'boolean',
},
{
name: 'assignee',
label: 'Assignee',
type: 'search_select',
searchOptions: [
{ label: 'Alice', value: '1' },
{ label: 'Bob', value: '2' },
],
search: assigneeSearch,
setSearch: setAssigneeSearch,
},
{
name: 'created_at',
label: 'Created Date',
type: 'date_input',
},
];
return (
<FiltersHeader
filters={filters}
debounceMs={400}
pagination={{ page: 0, pageSize: 20 }}
/>
);
}
pagination is passed, filter changes reset:
page=0pageSize=<your pageSize>Example URL:
?q=server&status=open&tags=bug,feature&archived=true&created_at=2026-03-07
Read params in your page:
const params = new URLSearchParams(window.location.search);
const q = params.get('q');
const createdAt = params.get('created_at');
FiltersHeader Props| Prop | Type | Default | Description |
|---|---|---|---|
filters | FilterConfig[] | required | Filter definitions |
pagination | { page: number; pageSize: number } | undefined | Resets page on filter change |
debounceMs | number | 500 | Debounce for text_input |
cssProperties | React.CSSProperties | undefined | Container inline styles |
containerClassName | string | undefined | Extra class for container |
FilterConfig Shapetype FilterType =
| 'text_input'
| 'select_input'
| 'multiselector'
| 'boolean'
| 'search_select'
| 'date_input';
interface FilterConfig {
name: string; // query param name
label: string;
type: FilterType;
placeholder?: string;
cssProperties?: React.CSSProperties;
// select_input / multiselector
options?: { label: string; name: string }[];
allLabel?: string;
// search_select
searchOptions?: { label: string; value: string | number }[];
search?: string;
setSearch?: (value: string) => void;
}
import 'react-filters-header/dist/index.css';name.search_select not filtering:
search and setSearch and update searchOptions based on the current search value.For complete troubleshooting flows and side-by-side examples, use the live guide:
FAQs
A set of URL-param-driven filter components for React apps — text input, select, multi-select, boolean toggle, search-select, and date input. Zero UI-framework dependencies.
We found that react-filters-header demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.