Pular para o conteúdo principal

TextArea

Import

import { TextArea } from '@resultadosdigitais/tangram-components'

Properties

disabled

Typebool
Defaultfalse

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

Typebool
Defaultfalse

Description

When the value is true, changes the layout to demonstrate that an error has occurred.

success

Typebool
Defaultfalse

Description

When the value is true, changes the layout to demonstrate that something positive has happened.

placeholder

Typestring

Description

Text that appears in the form control when it has no value set.

prefix

Typenode

Description

Adds content as a prefix to the value.

suffix

Typenode

Description

Adds content as a suffix to the value.

defaultValue

Typeany

Description

The default value. Use when the component is not controlled.

value

Typeany

Description

The value of the input element, required for a controlled component.

width

Typestring

Description

Sets the TextArea custom width.

nonResizable

Typebool
Defaultfalse

Description

Sets if the textarea can't be resized.

required

Typebool
Defaultfalse

Description

Sets if is required.

rows

Typenumber
Default2

Description

Sets the number of rows should be rendered.

invalid 🗑️

Concerns
🗑️ Deprecated: - Use with `Form.Control` to set error/invalid style.
Typebool

Description

Sets if is invalid

onChange

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.

Description

Callback fired when the value is changed.

<TextArea
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 ou sugerir alterações, use nosso formulário de melhorias ou, se preferir, abra uma issue no nosso Github.