Vue UI Components Documentation
The Vue Expander is a collapsible panel with a header and content. This guide adds the Vue Expander (jqxExpander) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-scriptsjqwidgets-scripts/jqwidgets-vue3/vue_jqxexpander.vue 
In a Vue 3 project (to start one, see Getting started with Vue), add the package:
npm install jqwidgets-scripts
import JqxExpander from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxexpander.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>
<JqxExpander :width="350">
<div>Early History of the Internet</div>
<div>
<ul>
<li>1961 First packet-switching papers</li>
<li>1966 Merit Network founded</li>
<li>1966 ARPANET planning starts</li>
<li>1969 ARPANET carries its first packets</li>
<li>1970 Mark I network at NPL (UK)</li>
<li>1970 Network Information Center (NIC)</li>
<li>1971 Merit Network's packet-switched network operational</li>
<li>1971 Tymnet packet-switched network</li>
<li>1972 Internet Assigned Numbers Authority (IANA) established</li>
<li>1973 CYCLADES network demonstrated</li>
<li>1974 Telenet packet-switched network</li>
<li>1976 X.25 protocol approved</li>
<li>1979 Internet Activities Board (IAB)</li>
<li>1980 USENET news using UUCP</li>
<li>1980 Ethernet standard introduced</li>
<li>1981 BITNET established</li>
</ul>
</div>
</JqxExpander>
</template>
<script setup>
import JqxExpander from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxexpander.vue';
</script>
<style></style>
Options are attributes. Bind values from the script with :, for example :width="850".
Listen to an event with @ and its name. For example, collapsing: This event is triggered when the jqxExpander is going to be collapsed.
<script setup>
function onCollapsing(event) {
console.log(event.args);
}
</script>
<template>
<JqxExpander @collapsing="onCollapsing" />
</template>
Call methods through a template ref. For example, expand: Method used for expanding the expander's content.
<script setup>
import { ref, onMounted } from 'vue';
const myExpander = ref(null);
onMounted(() => {
myExpander.value.expand();
});
</script>
<template>
<JqxExpander ref="myExpander" />
</template>
Every component also has setOptions({ … }) and getOptions('name').