Skip to content

InputText ​

The InputText component is a text input field used for collecting single-line text data from users.

Props ​

PropTypeDefaultDescription
placeholderstring-Placeholder text for the input field.
disabledbooleanfalseWhen present, it specifies that the input is disabled.
invalidbooleanfalseWhen present, it specifies that the input is invalid.

Example component ​

html
<InputText placeholder="Enter text" />

States ​

Default ​

The default state of the input text field.

html
<InputText placeholder="Enter your name" />

Disabled ​

The disabled state prevents user interaction with the input field.

html
<InputText placeholder="John" disabled />

Invalid ​

The invalid state indicates validation errors.

html
<InputText placeholder="John" invalid />