The Textarea-Component is part of the tobit-chayns_componetns package. It can be installed via npm:
npm install --save-dev tobit-chayns_components
At first the component has to be imported:
import Textarea from 'tobit-chayns_components/react-chayns-textarea';
Then it can be used like in the following example:
<Textarea placeholder="Eingabefeld"
onChange={this.change} />
Property | Description | Type |
---|---|---|
placeholder | Placeholder of the textarea | String |
defaultValue | defaultValue of the textarea | String |
className | CSS classes for the textarea | String |
style | Styles for the textarea | Object |
required | Makes the textarea required | bool |
autogrow | Activates the auto resizing of the textarea | bool |
reference | References the textarea element | function |
onKeyUp | onKeyUp-Event | function |
onKeyDown | onKeyDown-Event | function |
<Textarea placeholder="Hello World!"
autogrow={true} />
<Textarea reference={(node) => this._node = node} />