<Textarea Placeholder="Type your message here." />Installation
blazor-shadcn add textareaUsage
@using BlazorShadcn.Components.UI<Textarea Placeholder="Type your message here." />Examples
Field
Use Field, FieldLabel, and FieldDescription to create a textarea with a label and description.
Enter your message below.
<Field>
<FieldLabel For="textarea-message">Message</FieldLabel>
<Textarea id="textarea-message" Placeholder="Type your message here." />
<FieldDescription>Enter your message below.</FieldDescription>
</Field>Disabled
Use the disabled prop to disable the textarea. To style the disabled state, add the data-disabled attribute to the Field component.
<Field data-disabled="true">
<FieldLabel For="textarea-disabled">Message</FieldLabel>
<Textarea id="textarea-disabled" Placeholder="Type your message here." Disabled="true" />
</Field>Invalid
Use the aria-invalid prop to mark the textarea as invalid. To style the invalid state, add the data-invalid attribute to the Field component.
Please enter a valid message.
<Field data-invalid="true">
<FieldLabel For="textarea-invalid">Message</FieldLabel>
<Textarea id="textarea-invalid" Placeholder="Type your message here." aria-invalid="true" />
<FieldError>Please enter a valid message.</FieldError>
</Field>Button
Pair with Button to create a textarea with a submit button.
<div class="grid w-full max-w-xs gap-2">
<Textarea Placeholder="Type your message here." />
<Button>Send message</Button>
</div>