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 placeholdersets the placeholder textleftSectionandrightSectionallow to insert an icon, visually inside the text input.- The
requiredprop adds therequiredattribute to the element. In that case, Mantine automatically adds an asterisk. But we may remove it withwithAsterisk.