:link: Website • :books: Documentation • :eyes: Demos
SVAR Svelte Filter helps you add flexible filtering features to your Svelte apps: from simple filter bars to advanced query builders. It provides an intuitive UI to create and edit filtering rules, group filters, define conditions, and choose combining logic (AND/OR).
The package includes 3 widgets:
Check out the demos to see all SVAR Filter features in action.
You can install SVAR Svelte Filter as follows:
npm install wx-svelte-filter
To use SVAR Filter, simply import the package and include the component in your Svelte file:
<script>
import { FilterBuilder } from 'wx-svelte-filter';
const fields = [
{ id: "first_name", label: "Name", type: "text" },
{ id: "age", label: "Age", type: "number" }
];
const options = [
first_name: ["Alex", "Marta", "Claire", "David"],
age: [21, 25, 28, 35, 42, 51, 53]
];
</script>
<FilterBuilder {fields} {options} />
For further instructions, see the detailed how-to-start guide.
Typically, you don't need to modify the code. However, if you wish to do so, follow these steps:
yarn
to install dependencies. Note that this project is a monorepo using yarn
workspaces, so npm will not workyarn start
To run the test:
yarn start:tests
yarn test:cypress
Post an Issue or use our community forum.