Vue UI Components Documentation
The Vue Loader shows a loading indicator over the page or an element. This guide adds the Vue Loader (jqxLoader) to an app, then shows how to set its options and call its methods.
jqwidgets-scriptsjqwidgets-scripts/jqwidgets-vue3/vue_jqxloader.vue 
In a Vue 3 project (to start one, see Getting started with Vue), add the package:
npm install jqwidgets-scripts
import JqxLoader from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxloader.vue';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.tailwind-blue-dark.css';
With <script setup>, an imported component is ready to use in the template. jqx.base.css is required; the second file is a theme, selected with the theme attribute.
The Default Functionality demo as a Single-File Component:
<template>
<div>
<JqxLoader ref="jqxLoader" :imagePosition="'top'" :width="100" :height="60"> </JqxLoader>
<JqxButton @click="openLoaderClick($event)" :width="150"> Open Loader </JqxButton>
<JqxButton @click="closeLoaderClick($event)" :width="100"> Close </JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxLoader from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxloader.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const jqxLoader = ref(null);
function openLoaderClick(event) {
jqxLoader.value.open();
}
function closeLoaderClick(event) {
jqxLoader.value.close();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-right: 5px;
}
</style>
Options are attributes. Bind values from the script with :, for example :width="850".
Call methods through a template ref. For example, open: Opening/showing the current loader.
<script setup>
import { ref, onMounted } from 'vue';
const myLoader = ref(null);
onMounted(() => {
myLoader.value.open(200, 50);
});
</script>
<template>
<JqxLoader ref="myLoader" />
</template>
Every component also has setOptions({ … }) and getOptions('name').