React TextArea - Limit the Text Length

To limit the text length, assign an integer number to the maxLength property. By default, the text length is unlimited.

  • import React from 'react';
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { TextArea } from 'devextreme-react/text-area';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <TextArea maxLength={200}/>
  • );
  • }
  • }
  •  
  • export default App;
See Also