Shards React
DocumentationThe FormTextarea
component allows you to easily create multi-line text inputs.
🤔 Waiting for you to say something...
import React from "react";
import { FormTextarea } from "shards-react";
export default class BasicFormTextarea extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.state = { value: null };
}
handleChange(e) {
this.setState({ value: e.target.value });
}
render() {
const { value } = this.state;
return (
<div>
<p className="mb-2">
{(value && `🗣 ${value}`) || "🤔 Waiting for you to say something..."}
</p>
<FormTextarea onChange={this.handleChange} />
</div>
);
}
}
The following props are available for the Form Textarea
component.
Prop | Description | Type | Default | Required |
---|---|---|---|---|
className | The class name. | String | - | No |
children | The children nodes. | Node | - | No |
size | The size. | String | - | No |
plaintext | Whether it should be displayed as plain text, or not. | Bool | - | No |
valid | Whether it is valid, or not. | Bool | - | No |
invalid | Whether it is invalid, or not. | Bool | - | No |
innerRef | The inner ref. | Object Func String | - | No |