Input
Campo de entrada de texto com suporte a labels, mensagens de erro e texto auxiliar.
Basic Input
import { Input } from '@mt/design-system'<Input placeholder="Digite algo..." />
Input with Label
<Inputlabel="Nome completo"placeholder="João Silva"/>
Input with Helper Text
Usaremos este email para contato
<Inputlabel="Email"type="email"placeholder="exemplo@email.com"helperText="Usaremos este email para contato"/>
Input with Error
Email inválido
<Inputlabel="Email"type="email"placeholder="exemplo@email.com"error="Email inválido"/>
Disabled Input
<Inputlabel="Campo desabilitado"placeholder="Não editável"disabled/>
Password Input
<Inputlabel="Senha"type="password"placeholder="Digite sua senha"/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Label text for the input |
error | string | - | Error message to display |
helperText | string | - | Helper text to display below the input |
placeholder | string | - | Placeholder text |
type | string | 'text' | HTML input type |
disabled | boolean | false | Disables the input |
Este componente também aceita todas as props nativas do elemento <input> do HTML.