| Name | Type | Default |
|
animationType
# |
String
|
'fade'
|
Sets or gets the animation type.
Possible values: #
"fade"
"slide"
"none"
<template>
<JqxRibbon ref="myRibbon" :width="400" :animationType="'slide'">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
animationDelay
# |
Number
|
400
|
Sets or gets the duration of the ribbon animation.
<template>
<JqxRibbon ref="myRibbon" :width="400" :animationDelay="800">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
disabled
# |
Boolean
|
false
|
Enables/disables the ribbon.
<template>
<JqxRibbon ref="myRibbon" :width="400" :disabled="true">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
height
# |
Number | String
|
100
|
Sets or gets the ribbon's height.
<template>
<JqxRibbon ref="myRibbon" :width="400" :height="100">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
initContent
# |
Function
|
null
|
Initializes the content of jqxRibbon. Useful for initializing other widgets.
<template>
<JqxRibbon ref="myRibbon" :width="400" :initContent="initContent">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
function initContent() {
jqwidgets.createInstance('#button', 'jqxButton', { width: 50, height: 50 });
}
</script>
|
|
mode
# |
String
|
'default'
|
Sets or gets the ribbon's display mode.
Possible values: #
"default" - the ribbon's content is included in its height.
"popup" - the ribbon's content is not included in its height and is positioned absolutely. It overlaps elements underneath it.
<template>
<JqxRibbon ref="myRibbon" :width="400" :mode="'popup'">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
Sets or gets the way to close selected content sections when the mode property is set to "popup".
Possible values: #
"click"
"mouseLeave"
"none"
<template>
<JqxRibbon ref="myRibbon" :width="400" :mode="'popup'" :popupCloseMode="'mouseLeave'">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
position
# |
String
|
'top'
|
Sets or gets whether the ribbon's header is positioned at the top, bottom, left or right of the content.
Possible values: #
"top"
"bottom"
"left"
"right"
<template>
<JqxRibbon ref="myRibbon" :width="400" :position="'bottom'">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
reorder
# |
Boolean
|
false
|
Sets or gets whether the ribbon's tabs can be reordered.
<template>
<JqxRibbon ref="myRibbon" :width="400" :reorder="true">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
rtl
# |
Boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
<template>
<JqxRibbon ref="myRibbon" :width="400" :rtl="true">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
selectedIndex
# |
Number
|
0
|
Sets or gets the selected index (tab).
<template>
<JqxRibbon ref="myRibbon" :width="400" :selectedIndex="1">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
selectionMode
# |
String
|
'click'
|
Sets or gets the selection mode.
Possible values: #
"click"
"hover"
"none"
<template>
<JqxRibbon ref="myRibbon" :width="400" :selectionMode="'hover'">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
scrollPosition
# |
String
|
'both'
|
Sets or gets the position of the scrollbar buttons.
Possible values: #
"both"
"near"
"far"
<template>
<JqxRibbon ref="myRibbon" :width="100" :scrollPosition="'near'">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
scrollStep
# |
Number
|
10
|
Sets or gets the scroll step.
<template>
<JqxRibbon ref="myRibbon" :width="100" :scrollStep="20">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
scrollDelay
# |
Number
|
50
|
Sets or gets the scroll delay.
<template>
<JqxRibbon ref="myRibbon" :width="100" :scrollDelay="100">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
- Include the theme's CSS file after jqx.base.css.
The following code example adds the 'material' theme. <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css"type="text/css"/>
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.material.css" type="text/css" />
- Set the widget's theme property to 'material' when you initialize it.
$('#jqxRibbon').jqxRibbon({ theme: 'material' });
<template>
<JqxRibbon ref="myRibbon" :width="400" :theme="'material'">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
width
# |
Number | String
|
null
|
Sets or gets the ribbon's width.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
</script>
|
|
|
|
change
# |
Event
|
|
This event is triggered when the user selects or unselects an item.
Code examples #
Bind to the change event of jqxRibbon.
<template>
<JqxRibbon ref="myRibbon" @change="onChange($event)" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
function onChange(event) {
alert('do something...');
}
</script>
|
|
reorder
# |
Event
|
|
This event is triggered when the user reorders the jqxRibbon items with the mouse.
Code examples #
Bind to the reorder event of jqxRibbon.
<template>
<JqxRibbon ref="myRibbon" @reorder="onReorder($event)" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
function onReorder(event) {
alert('do something...');
}
onMounted(() => {
myRibbon.value.reorder = true;
});
</script>
|
|
select
# |
Event
|
|
This event is triggered when the user selects an item.
Code examples #
Bind to the select event of jqxRibbon.
<template>
<JqxRibbon ref="myRibbon" @select="onSelect($event)" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
function onSelect(event) {
alert('do something...');
}
</script>
|
|
unselect
# |
Event
|
|
This event is triggered when the user unselects an item.
Code examples #
Bind to the unselect event of jqxRibbon.
<template>
<JqxRibbon ref="myRibbon" @unselect="onUnselect($event)" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
function onUnselect(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
addAt
# |
index, item
|
None
|
Adds a new item by index.
- index - number;
- data - object with the following properties:
- title - string;
- content - string.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.addAt(0, { title: 'New item', content: 'New content' });
});
</script>
|
|
clearSelection
# |
None
|
None
|
Unselects the selected item and collapses its content.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.clearSelection();
});
</script>
|
|
disableAt
# |
index
|
None
|
Disables an item by index. Index is a number.
<template>
<div>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
<JqxButton @click="enable">Enable</JqxButton>
<JqxButton @click="disable">Disable</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myRibbon = ref(null);
function enable() {
myRibbon.value.enableAt(0);
}
function disable() {
myRibbon.value.disableAt(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 15px;
margin-right: 20px;
}
</style>
|
|
destroy
# |
None
|
None
|
Destroys the jqxRibbon widget.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.destroy();
});
</script>
|
|
enableAt
# |
index
|
None
|
Enables a disabled item by index. Index is a number.
<template>
<div>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
<JqxButton @click="enable">Enable</JqxButton>
<JqxButton @click="disable">Disable</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myRibbon = ref(null);
function enable() {
myRibbon.value.enableAt(0);
}
function disable() {
myRibbon.value.disableAt(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 15px;
margin-right: 20px;
}
</style>
|
|
hideAt
# |
index
|
None
|
Hides an item by index. Index is a number.
<template>
<div>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
<JqxButton @click="show">Show</JqxButton>
<JqxButton @click="hide">Hide</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myRibbon = ref(null);
function show() {
myRibbon.value.showAt(0);
}
function hide() {
myRibbon.value.hideAt(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 15px;
margin-right: 20px;
}
</style>
|
|
removeAt
# |
index
|
None
|
Removes an item from the ribbon. Index is a number.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.removeAt(0);
});
</script>
|
|
render
# |
None
|
None
|
Renders the jqxRibbon widget.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.render();
});
</script>
|
|
refresh
# |
None
|
None
|
Refreshes the jqxRibbon widget.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.refresh();
});
</script>
|
|
selectAt
# |
index
|
None
|
Selects the item with indicated index. Index is a number.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.selectAt(1);
});
</script>
|
|
showAt
# |
index
|
None
|
Shows an item by index. Index is a number.
<template>
<div>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
<JqxButton @click="show">Show</JqxButton>
<JqxButton @click="hide">Hide</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myRibbon = ref(null);
function show() {
myRibbon.value.showAt(0);
}
function hide() {
myRibbon.value.hideAt(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 15px;
margin-right: 20px;
}
</style>
|
Sets the layout of an item's content if mode is set to "popup".
- index - number;
- layout - string, possible values:
- "default" - the item's content is aligned with the widget's header;
- "near" - the item's content is left/top aligned with its title;
- "far" - the item's content is right/bottom aligned with its title;
- "center" - the item's content is centered under/next to its title.
- width - number/string;
- height - number/string.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.mode = 'popup';
myRibbon.value.setPopupLayout(0, 'near', 200, 200);
});
</script>
|
|
updateAt
# |
index, item
|
None
|
Updates an item.
Note: after an item has been updated with updateAt, initContent will be called again for that item (if set).
- index - number;
- newData - object with the following properties:
- newTitle - string;
- newContent - string.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.updateAt(1, { newTitle: 'Updated title', newContent: 'Updated content' });
});
</script>
|
|
val
# |
value
|
String
|
Sets or gets the selected index. Index is a number.
<template>
<JqxRibbon ref="myRibbon" :width="400">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<div>
<div>Content 1<input type="button" id="button" value="Button" /></div>
<div>Content 2</div>
</div>
</JqxRibbon>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxRibbon from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxribbon.vue';
const myRibbon = ref(null);
onMounted(() => {
myRibbon.value.val(1);
});
</script>
|