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β
To report a problem, request new icons, request new component use cases, ask questions, share suggestions, or report bugs, get in touch through our Slack channel #tangram-design-system.