title: "Textarea" slug: "/packages/textarea" category: "control" componentNames:
- "Textarea"
Textarea
import Textarea from "@ds-kit/textarea"
Basic Example
A basic example of an Textarea component can look like this:
class Example extends React.Component {
constructor(props) {
super(props)
this.state = {
value: "",
}
}
render() {
return (
<Textarea
value={this.state.value}
placeholder={"Type some text here..."}
onChange={e =>
this.setState({
value: e.target.value,
})
}
/>
)
}
}
Vertical resize
<>
<Textarea size="sm" placeholder={"Type some text here..."} />
<Textarea size="md" placeholder={"Type some text here..."} />
<Textarea size="lg" placeholder={"Type some text here..."} />
</>