Components
Textarea

Textarea

The Textarea component provides you with multi-line text fields.

Live Examples

Storybook: components-textarea--default
Storybook: components-textarea--with-value
Storybook: components-textarea--form-example

Examples

import { Textarea } from '@nostromo/ui-core'
 
export default function TextareaExample() {
  return (
    <div className="space-y-4">
      <Textarea placeholder="Type your message here..." />
      <Textarea placeholder="Large textarea" rows={6} />
    </div>
  )
}

With Label

import { Textarea, Label } from '@nostromo/ui-core'
 
export default function TextareaWithLabel() {
  return (
    <div className="space-y-2">
      <Label htmlFor="message">Message</Label>
      <Textarea id="message" placeholder="Your message..." />
    </div>
  )
}

Props

PropTypeDefaultDescription
placeholderstring-Placeholder text
rowsnumber3Number of rows
disabledbooleanfalseWhether textarea is disabled
valuestring-Textarea value
onChangefunction-Change handler