We’re happy to announce the release of SVAR Svelte Filter, a set of Svelte components that help you add an advanced filtering UI and logic to your Svelte project. SVAR Filter provides an intuitive interface for building complex queries with AND/OR groups and nested rules.
If you’re building a data-oriented Svelte app, it is important to give your users a way to extract necessary information out of the large dataset. That’s where a good filtering UI comes in, and SVAR Svelte Filter helps you add one without building it from scratch.
SVAR Svelte Filter library includes three modular widgets that provide Filter’s functionality:
FilterBuilder
This is a core component of the Filter package. It provides a clean, user-friendly UI for building filter queries across one or multiple fields. FilterBuilder supports grouping rules, adding nested filters and combining them using AND / OR logic. Ideal for managing complex filtering scenarios in an easy visual way.
FilterEditor
A part of the FilterBuilder component that can be used standalone. You can use it to build a rule for a single field. This is the example of how it may look like:
FilterBar
This is a nice addition to the above widgets that can be used to create the same filtering rules but present them as a simple input and select controls. Just like FilterBuilder widget, FilterBar supports multi-field filtering and AND / OR logic, but with a more compact, form-style layout, which is useful when space is limited or you want a minimal interface.
SVAR Svelte Filter has everything you need to add advanced filtering feature to your Svelte app:
SVAR Svelte Filter is open source and available under the MIT license. You can install it via npm:
npm install wx-svelte-filter
To start working with the Filter components, follow these links:
If you find SVAR Filter useful, we’d really appreciate your stars on GitHub! You’re welcome to open issues there or post questions in our community forum.