@syncfusion/ej2-vue-querybuilder

29.2.4 • Public • Published

Vue Query Builder Component (Vue Filter Component)

The Vue Query Builder is a rich and responsive UI for filtering large amounts of data by creating or editing conditions that can be combined with data visualization controls like DataGrid and Charts to view the filtered data. It outputs structured JSON that can be easily parsed to create SQL queries. It allows you to create conditions and group them using AND/OR logic.

Getting started . Online demos . Learn more

Vue Query Builder Component

Trusted by the world's leading companies Bootstrap logo

Setup

Create a Vue Application

You can use Vue CLI to setup your Vue 2 application.To install Vue CLI use the following commands.

npm install -g @vue/cli
vue create quickstart
cd quickstart
npm run serve

Initiating a new project prompts us to choose the type of project to be used for the current application. Select the option Default ([Vue 2] babel, eslint) from the menu.

Adding Syncfusion® Vue Query Builder package

All Syncfusion® Vue packages are published in npmjs.com registry. To install vue query builder package, use the following command.

npm install @syncfusion/ej2-vue-querybuilder --save

Registering Vue Query Builder component

You can register the vue query builder component in your application by using the Vue.use(). Refer to the code example given below.

import { QueryBuilderPlugin } from "@syncfusion/ej2-vue-querybuilder";
Vue.use(QueryBuilderPlugin);

Registering QueryBuilderPlugin in vue, will register the query builder component along with its required child directives globally.

Adding CSS references for Query Builder

Add CSS references needed for Query Builder in style section of the App.vue file from ../node_modules/@syncfusion package folder.

<style>
@import "../node_modules/@syncfusion/ej2-base/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-dropdowns/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-inputs/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-lists/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-popups/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-calendars/styles/bootstrap5.css";
@import "../node_modules/@syncfusion/ej2-vue-querybuilder/styles/bootstrap5.css";
</style>

Add Syncfusion® Vue Query Builder component

Add the Syncfusion® Vue Query Builder by using ejs-querybuilder selector in template section of the App.vue file.

<template>
    <div id="app">
        <ejs-querybuilder width="70%">
            <e-columns>
                <e-column field='EmployeeID' label='Employee ID' type='number' />
                <e-column field='FirstName' label='First Name' type='string' />
                <e-column field='TitleOfCourtesy' label='Title Of Courtesy' type='boolean' :values="values"/>
                <e-column field='Title' label='Title' type='string' />
                <e-column field='HireDate' label='Hire Date' type='date' format='dd/MM/yyyy' />
                <e-column field='Country' label='Country' type='string' />
                <e-column field='City' label='City' type='string' />
            </e-columns>
        </ejs-querybuilder>
    </div>
</template>
<script>
    import Vue from "vue";
    import { QueryBuilderPlugin } from "@syncfusion/ej2-vue-querybuilder";
    Vue.use(QueryBuilderPlugin);
    export default {
    data() {
        return {
        values: ['Mr.', 'Mrs.']
        };
    },
    }
</script>

Refer the Getting started with Vue3 for using Syncfusion® Vue components in Vue 3 applications.

Supported frameworks

Query Builder component is offered in the following list of frameworks.


     JavaScript    

       Angular      

       React         

  ASP.NET Core  

  ASP.NET MVC  

Key features

  • Data Sources: The Query Builder can be bound to a variety of data sources, including arrays of JSON objects, complex data structures such as nested objects or arrays, and Data Manager. This allows users to filter data from a wide range of sources.
  • Template: The Query Builder offers templates that allow users to create custom user experiences by customizing the user interface for individual values, the entire rule, and the group header. This allows users to tailor the Query Builder to their specific needs and preferences.
  • Importing and Exporting: The Query Builder allows users to export filters or conditions as SQL and structured JSON, and to import these filters into the Query Builder for regeneration. This makes it easy for users to save and share their filters with others.
  • Model Binding: The Query Builder allows users to bind properties for the components used in the field, operator, and value user interfaces, allowing users to define the behavior and appearance of these components.
  • RTL support: The Query Builder supports RTL (right-to-left) mode, which aligns content from right to left. This is useful for languages that are written in a right-to-left script, such as Arabic.
  • Localization: The Query Builder provides inherent support for localization, allowing users to easily translate the user interface into different languages. This makes the Query Builder more accessible to users who speak languages other than English.
  • Rich and responsive UI: The Query Builder provides a user-friendly interface for creating and editing conditions, making it easy for users to filter large amounts of data.
  • AND/OR logic: The Query Builder allows users to group conditions using AND/OR logic, giving them greater control over the filtered data.
  • Integration with data visualization controls: The Query Builder can be used in conjunction with data visualization controls like DataGrid and Charts to view the filtered data, providing a more comprehensive view of the data.
  • Easy to use: The Query Builder is easy to use and can be easily integrated into any project, making it a convenient and powerful tool for filtering data.

Support

Product support is available through the following mediums.

Changelog

Check the changelog here. Get minor improvements and bug fixes every week to stay up to date with frequent updates.

License and copyright

This is a commercial product and requires a paid license for possession or use. Syncfusion® licensed software, including this component, is subject to the terms and conditions of Syncfusion® EULA. To acquire a license for 80+ Vue UI components, you can purchase or start a free 30-day trial. A free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers. See LICENSE FILE for more info.

© Copyright 2025 Syncfusion® Inc. All Rights Reserved. The Syncfusion® Essential Studio® license and copyright applies to this distribution.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
29.2.481latest

Version History

VersionDownloads (Last 7 Days)Published
29.2.481
29.1.4139
29.1.392
29.1.3354
28.2.358
28.1.355
28.1.330
27.2.514
27.2.30
27.2.20
27.1.580
27.1.570
27.1.551
27.1.530
27.1.520
27.1.500
27.1.480
26.2.1142
26.2.100
26.2.81
26.2.50
26.2.40
26.1.422
26.1.400
26.1.380
26.1.350
25.2.78
25.2.40
25.2.30
25.1.420
25.1.400
25.1.380
25.1.370
25.1.350
24.2.95
24.2.80
24.2.50
24.2.34
24.1.460
24.1.450
24.1.440
24.1.430
24.1.410
23.2.75
23.2.40
23.1.440
23.1.410
23.1.390
23.1.380
23.1.360
22.2.11333
22.2.90
22.2.80
22.2.51
22.1.380
22.1.370
22.1.340
21.2.427
21.2.30
21.1.371
21.1.350
20.4.5114
20.4.480
20.4.420
20.4.400
20.4.380
20.3.590
20.3.560
20.3.500
20.3.490
20.3.470
20.2.500
20.2.480
20.2.460
20.2.450
20.2.430
20.2.400
20.2.380
20.2.360
20.1.591
20.1.558
20.1.510
20.1.480
20.1.4718
19.4.564
19.4.550
19.4.530
19.4.520
19.4.500
19.4.480
19.4.470
19.4.420
19.4.400
19.4.380
19.3.530
19.3.450
19.3.440
19.3.430
19.2.602
19.2.590
19.2.550
19.2.510
19.2.460
19.2.440
19.1.636
19.1.571
19.1.550
19.1.540
18.4.476
18.4.420
18.4.390
18.4.330
18.4.320
18.4.300
18.3.530
18.3.520
18.3.510
18.3.500
18.3.470
18.3.420
18.3.400
18.3.350
18.2.570
18.2.550
18.2.540
18.2.470
18.2.460
18.2.450
18.2.440
18.1.560
18.1.550
18.1.530
18.1.520
18.1.480
18.1.450
18.1.440
18.1.430
18.1.421
18.1.36-beta0
17.4.510
17.4.490
17.4.470
17.4.460
17.4.430
17.4.410
17.4.390
17.3.270
17.3.260
17.3.210
17.3.190
17.3.140
17.3.9-beta0
17.2.48-beta0
17.2.29-beta0
17.2.470
17.2.460
17.2.360
17.2.350
17.2.340
17.2.28-beta0
17.1.510
17.1.500
17.1.490
17.1.480
17.1.470
17.1.430
17.1.420
17.1.400
17.1.380
17.1.32-beta0
16.4.540
16.4.520
17.1.1-beta0
16.4.470
16.4.440
16.4.420
16.4.40-beta0

Package Sidebar

Install

npm i @syncfusion/ej2-vue-querybuilder

Weekly Downloads

744

Version

29.2.4

License

SEE LICENSE IN license

Unpacked Size

123 kB

Total Files

148

Last publish

Collaborators

  • syncfusionorg
  • essentialjs2
  • syncfusion-javascript