TextInput

TextInput is an abstraction over an <input type=text/> element. It inherits some props from the abstract <Input> component.

  • We set the main label with label. A main label is often necessary to explain the purpose of such input.
  • We set the optional secondary label with description
  • placeholder sets the placeholder text
  • leftSection and rightSection allow to insert an icon, visually inside the text input.
  • The required prop adds the required attribute to the element. In that case, Mantine automatically adds an asterisk. But we may remove it with withAsterisk.
earlymorning logo

© 2025 - All rights reserved

TextInput

TextInput is an abstraction over an <input type=text/> element. It inherits some props from the abstract <Input> component.

  • We set the main label with label. A main label is often necessary to explain the purpose of such input.
  • We set the optional secondary label with description
  • placeholder sets the placeholder text
  • leftSection and rightSection allow to insert an icon, visually inside the text input.
  • The required prop adds the required attribute to the element. In that case, Mantine automatically adds an asterisk. But we may remove it with withAsterisk.