JavaScript/jQuery NumberBox - Control the Behavior

If you need to add spin buttons to the NumberBox, set the showSpinButtons to true.

App.vue
  • <template>
  • <DxNumberBox
  • :value="20"
  • :show-spin-buttons="true"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import DxNumberBox from 'devextreme-vue/number-box';
  •  
  • export default {
  • components: {
  • DxNumberBox
  • }
  • }
  • </script>

To specify the step by which the value is changed, use the step property.

App.vue
  • <template>
  • <DxNumberBox
  • :value="20"
  • :show-spin-buttons="true"
  • :step="10"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import DxNumberBox from 'devextreme-vue/number-box';
  •  
  • export default {
  • components: {
  • DxNumberBox
  • }
  • }
  • </script>
See Also