mantine-composite-filters
A powerful, flexible composite filters component for Mantine with support for multiple filter types, presets, history, and advanced customization
Installation
Overview
Build powerful filter interfaces in minutes. CompositeFiltersInput brings LinkedIn-style composite filtering to your Mantine apps - complete with type-safe definitions, smart operators, presets, and full keyboard support.
Why use this?
- Type any field name to start filtering
- Smart operator selection based on data type
- Save filter combinations as reusable presets
- Full keyboard navigation for power users
- Zero configuration localStorage persistence
Quick Start
Three props to get started:
Interactive Playground
Options
Filter Types
Seven built-in types cover most filtering needs:
Limiting Filters
Control complexity with maxFilters:
Layout Options
Two overflow modes for different UI needs:
Scroll Mode (default)
Filters scroll horizontally when they exceed the container width
Wrap Mode
Filters wrap to multiple lines when they exceed the container width
Presets & History
Let users save and recall filter combinations:
Click the ⋮ menu to:
- Save current filters as a preset
- Load saved presets
- Mark presets as favorites
- View filter history
Data persists in browser localStorage
Built-in features (all persisted to localStorage):
- Save presets - Name and store filter combinations
- Favorites - Quick access to frequently used presets
- History - Auto-tracked recent filter combinations
Styles API
CompositeFiltersInput supports Styles API, you can add styles to any inner element of the component with classNames prop.
Component Styles API
Hover over selectors to highlight corresponding elements
Styling Examples
Make it yours with styles or classNames:
Inline Styles
CSS Classes
Custom Pills
Replace default filter chips with your own creative designs:
Add some filters to preview different pill styles
Gradient Style
Outlined with Icon
Card Style with Color Accent
Keyboard Shortcuts
Power user? Navigate without touching your mouse:
In Action
See it work with real data filtering:
Showing 5 of 5 users
| User | Role | Department | Status |
|---|---|---|---|
AC Alice Chen alice@company.com | admin | Engineering | active |
BS Bob Smith bob@company.com | editor | Design | active |
CD Carol Davis carol@company.com | viewer | Marketing | inactive |
DW Dan Wilson dan@company.com | editor | Sales | active |
EM Eva Martinez eva@company.com | viewer | Engineering | active |
Pro Tips
Inline Editing - Click any part of an active filter to edit it directly (field, operator, or value).
Extend the Menu - Add your own actions:
Isolate Storage - Use storageKeyPrefix when you have multiple filter instances:
API Reference
FilterDefinition
ActiveFilter
TypeScript
Fully typed. Import what you need:
Tips
- Debounce - For large datasets, debounce the
onChangebefore fetching - Server validation - Always validate filter values server-side
- Mobile UX - Use
overflowMode="wrap"on smaller screens - Unique keys - Each filter definition needs a unique
key