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

Textarea props

Name
Type
Default
size
"sm""md""lg"
"md"
lineHeight
stringnumberarray
"1.25"
fontSize
stringnumberarray
px
stringnumberarray
py
stringnumberarray
width
stringnumberarray
"100%"
height
stringnumberarray
color
string
bg
string
maxWidth
stringnumberarray
borderColor
string
"grey.200"
hoverBorderColor
string
"primary"
hoverBorderOutline
string
"rgba(81,30,233,0.2)"
placeholderColor
string
"grey.700"
value
string
onChange
func
() => {}
children
objectnode