React NumberBox - Control the Behavior
If you need to add spin buttons to the NumberBox, set the showSpinButtons to true.
App.js
- import React from 'react';
- import 'devextreme/dist/css/dx.light.css';
- import NumberBox from 'devextreme-react/number-box';
- class App extends React.Component {
- render() {
- return (
- <NumberBox
- defaultValue={20}
- showSpinButtons={true} />
- );
- }
- }
- export default App;
To specify the step by which the value is changed, use the step property.
App.js
- import React from 'react';
- import 'devextreme/dist/css/dx.light.css';
- import NumberBox from 'devextreme-react/number-box';
- class App extends React.Component {
- render() {
- return (
- <NumberBox
- defaultValue={20}
- showSpinButtons={true}
- step={10} />
- );
- }
- }
- export default App;
See Also
- Handle Events: Angular | Vue | React | jQuery | AngularJS | Knockout
- NumberBox Demos
- NumberBox API Reference
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.