Docs
Expanding Textarea

Expanding Textarea

Displays a textarea which autoexpands (or shrinks) based on its content.

import { useState } from 'react'
import { ExpandingTextArea } from 'ui'
 
export function ExpandingTextareaDemo() {
  const [value, setValue] = useState('')
 
  return (
    <ExpandingTextArea
      placeholder="Type your message in multiple lines here."
      value={value}
      onChange={(event) => {
        setValue(event.target.value)
      }}
    />
  )
}

Usage

import { ExpandingTextArea } from 'ui'
<ExpandingTextArea />

Examples

Default

import { useState } from 'react'
import { ExpandingTextArea } from 'ui'
 
export function ExpandingTextareaDemo() {
  const [value, setValue] = useState('')
 
  return (
    <ExpandingTextArea
      placeholder="Type your message in multiple lines here."
      value={value}
      onChange={(event) => {
        setValue(event.target.value)
      }}
    />
  )
}