Textarea
---import { Textarea } from "@/components/starwind/textarea";---
<Textarea placeholder="Type something..." />Installation
pnpx starwind@latest add textareanpx starwind@latest add textareayarn dlx starwind@latest add textareaUsage
size
---import { Textarea } from "@/components/starwind/textarea";---
<Textarea size="sm" placeholder="Small textarea" /><Textarea size="md" placeholder="Medium textarea" /><Textarea size="lg" placeholder="Large textarea" />disabled
---import { Textarea } from "@/components/starwind/textarea";---
<Textarea disabled placeholder="Disabled textarea" />API Reference
Textarea
A versatile textarea component with multiple sizes and states.
| Prop | Type | Default |
|---|---|---|
size | "sm" | "md" | "lg" | "md" |
class | string | - |
<Textarea size="md" placeholder="Type something..." />Additional Notes:
- This component accepts all standard HTML
<textarea>attributes
Changelog
v1.2.1
- add
aria-invalidstyling
v1.2.0
- Add a
data-slotattribute to all components to enable global styling updates
v1.1.1
- Adjust component to use type
VariantPropsfromtailwind-variants. This provides greater type safety and cleans up component frontmatter.
v1.1.0
tailwind-variantsnow implemented. This usestailwind-mergeunder the hood to merge Tailwind classes without style conflicts, allowing you to override any existing classes using the “class” prop.