Textarea

Displays a form textarea or a component that looks like a textarea.

Import

import { Textarea } from '@akitectio/aki-ui'

Basic Usage

<Textarea placeholder="Type your message here." />

Disabled

<Textarea placeholder="Type your message here." disabled />

With Text

const [value, setValue] = useState('');

<Textarea 
  placeholder="Type your message here." 
  value={value}
  onChange={(e) => setValue(e.target.value)}
/>

With Label

<div className="grid w-full gap-1.5">
  <label className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
    Your message
  </label>
  <Textarea placeholder="Type your message here." />
</div>

With Text and Button

<div className="grid w-full gap-2">
  <Textarea placeholder="Type your message here." />
  <button className="bg-black text-white px-4 py-2 rounded text-sm">
    Send message
  </button>
</div>