HelpBot Assistant

How can I help you?

Set the disabled state in React TextBox component

21 Feb 20262 minutes to read

Disable user interaction with the TextBox by setting the enabled property to false on the TextBoxComponent. A disabled TextBox prevents input, prevents focus, and typically displays with reduced opacity to indicate its unavailable state.

import * as React from "react";
import * as ReactDOM from "react-dom";
import { TextBoxComponent } from "@syncfusion/ej2-react-inputs";
export default class App extends React.Component {
    render() {
        return (<div>
                <TextBoxComponent placeholder="Enter Name" enabled={false}/>
            </div>);
    }
}
;
ReactDOM.render(<App />, document.getElementById('input-container'));
import { TextBoxComponent } from "@syncfusion/ej2-react-inputs";
import * as React from "react";
import * as ReactDOM from "react-dom";
export default class App extends React.Component<{}, {}> {
    public render() {
        return (
            <div>
                <TextBoxComponent placeholder="Enter Name" enabled={false}/>
            </div>
        )
    }
};
ReactDOM.render(<App />, document.getElementById('input-container'));