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
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | - | Placeholder text |
rows | number | 3 | Number of rows |
disabled | boolean | false | Whether textarea is disabled |
value | string | - | Textarea value |
onChange | function | - | Change handler |