| Name | Type | Default |
|
disabled
# |
Boolean
|
false
|
Enables or disables the button.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" :disabled="true" />
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
height
# |
String | Number
|
null
|
Sets or gets the button's height.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" />
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
imgSrc
# |
String
|
''
|
Sets or gets the button's image source.
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:imgPosition="'left'"
:imgSrc="'https://jqwidgets.com/jquery-widgets-demo/images/andrew.png'"
:imgHeight="14"
:imgWidth="14"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
imgWidth
# |
Number
|
16
|
Sets or gets the button's image width.
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:imgPosition="'left'"
:imgSrc="'https://jqwidgets.com/jquery-widgets-demo/images/andrew.png'"
:imgHeight="14"
:imgWidth="14"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
imgHeight
# |
Number
|
16
|
Sets or gets the button's image height.
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:imgPosition="'left'"
:imgSrc="'https://jqwidgets.com/jquery-widgets-demo/images/andrew.png'"
:imgHeight="14"
:imgWidth="14"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
imgPosition
# |
String
|
'center'
|
Sets or gets the button's image position. Possible values: "left", "top", "center", "bottom", "right", "topLeft", "bottomLeft", "topRight", "bottomRight".
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:imgPosition="'left'"
:imgSrc="'https://jqwidgets.com/jquery-widgets-demo/images/andrew.png'"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
roundedCorners
# |
String
|
all
|
Enables or disables the rounded corners functionality. This property setting has effect in browsers which support CSS border-radius.
Possible Values:
'all' - for all corners
'top'- for top corners
'bottom' - for bottom corners
'left' - for left corners
'right' - for right corners
'top-right' - for top right corners
'top-left' - for top left corners
'bottom-right' - for bottom right corners
'bottom-left' - for bottom left corners
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:roundedCorners="'top'"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.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>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" :rtl="true" />
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
enableDefault
# |
Boolean
|
true
|
<template>
<JqxButton ref="myButton"
:width="120" :height="40" :value="'Click Me!'" :enableDefault="false"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
cursor
# |
String
|
'arrow'
|
<template>
<JqxButton ref="myButton"
:width="120" :height="40" :value="'Click Me!'" :cursor="'arrow'"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
textPosition
# |
String
|
''
|
Sets or gets the button's text position. Possible values: "left", "top", "center", "bottom", "right", "topLeft", "bottomLeft", "topRight", "bottomRight".
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:textPosition="'right'"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
textImageRelation
# |
String
|
'overlay'
|
Sets or gets the button's text image relation. Possible values: "imageBeforeText", "imageAboveText", "textAboveImage", "textBeforeImage" and "overlay".
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:imgPosition="'left'"
:imgSrc="'https://jqwidgets.com/jquery-widgets-demo/images/andrew.png'"
:textImageRelation="'imageBeforeText'"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" :theme="'material'" />
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
template
# |
String
|
'default'
|
Determines the button's template as an alternative of the default styles.
Possible Values:
'default' - the default button's template. The button's style depends only on its "theme" property value.
'primary' - dark blue button for extra visual weight.
'success' - green button for successful or positive action.
'warning' - orange button which indicates caution.
'danger' - red button which indicates a dangerous or negative action.
'inverse' - dark gray button, not tied to a semantic action or use.
'info' - blue button, not tied to a semantic action or use.
'link' - making it look like a link .
<template>
<JqxButton
ref="myButton"
:width="120"
:height="40"
:value="'Click Me!'"
:template="'success'"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
width
# |
String | Number
|
null
|
Sets ot gets the button's width.
<template>
<JqxButton ref="myButton" :width="240" :height="40" :value="'Click Me!'" />
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
value
# |
String
|
''
|
Sets or gets the button's value.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Button'" />
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
</script>
|
|
|
|
click
# |
Event
|
|
This event is triggered when the button is clicked.
Code examples #
Bind to the click event of jqxButton.
<template>
<JqxButton
ref="myButton"
@click="onClick($event)"
:width="120"
:height="40"
:value="'Click Me!'"
/>
</template>
<script setup>
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
function onClick(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
destroy
# |
None
|
None
|
Destroys the widget.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myButton = ref(null);
onMounted(() => {
myButton.value.destroy();
});
</script>
|
|
focus
# |
None
|
None
|
Focuses the widget.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myButton = ref(null);
onMounted(() => {
myButton.value.focus();
});
</script>
|
|
render
# |
None
|
None
|
Renders the widget.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myButton = ref(null);
onMounted(() => {
myButton.value.render();
});
</script>
|
|
val
# |
value
|
String
|
Sets or gets the value.
<template>
<JqxButton ref="myButton" :width="120" :height="40" :value="'Click Me!'" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myButton = ref(null);
onMounted(() => {
const value = myButton.value.val('New Text');
});
</script>
|