Input
Import
import { Input } from '@resultadosdigitais/tangram-components'
Properties
disabled
| Type | bool |
|---|---|
| Default | false |
Description
When the value is true, makes the element not mutable, focusable, or even submitted with the form.
The user can neither edit nor focus on the control.
error
| Type | bool |
|---|---|
| Default | false |
Description
When the value is true, changes the layout to demonstrate that an error has occurred.
success 🗑️
| Concerns | 🗑️ Deprecated: Does not alter the appearance of the `Input`. |
|---|---|
| Type | bool |
Description
required
placeholder
prefix
suffix
defaultValue
value
width
onChange
| Type | func |
|---|---|
| Param | event React.SyntheticEvent - The event source of the callback. |
Description
Callback fired when the value is changed.
<Input
name="example"
onChange={function (event) {
const { name, value } = event.target;
console.log(`The input's name is ${name} and the value is ${value}`);
}}
/>
Feedback
Para reportar algum problema, solicitar novos ícones, solicitar novos casos de uso de componentes, tirar dúvidas, enviar sugestões ou reportar bugs, entre em contato pelo nosso canal no Slack #tangram-design-system.