1.1.0 • Published 5 years ago

@ds-kit/textarea v1.1.0

Weekly downloads
-
License
LicenseRef-LICENS...
Repository
-
Last release
5 years ago

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..."} />
</>