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 textleftSection
andrightSection
allow to insert an icon, visually inside the text input.- The
required
prop adds therequired
attribute to the element. In that case, Mantine automatically adds an asterisk. But we may remove it withwithAsterisk
.