Basic
<Textarea></Textarea>
Controlled
<Textarea value={value} onInput={onInput}></Textarea>
Rounded
Set
rounded
to "square"
, "sm"
or "lg"
. Defaults to the value of the CSS variable --default-roundedness
. See "Default roundedness".<Stack class="gap-5">
<Textarea rounded="square"></Textarea>
<Textarea rounded="sm"></Textarea>
<Textarea rounded="lg"></Textarea>
</Stack>
Disabled
Set
disabled
to either true
or false
. Defaults to false
.<Textarea disabled></Textarea>
Readonly
Set
readonly
to either true
or false
. Defaults to false
.<Textarea readonly>Example</Textarea>
Invalid
Set
invalid
to either true
or false
. Defaults to false
.<Textarea invalid>Example</Textarea>
Props
rounded
Required
false
Type
'square' | 'sm' | 'lg'
Default
none
Notes
Defaults to the value of the CSS variable
--default-roundedness
. See "Default roundedness".invalid
Required
false
Type
boolean
Default
false
children
*Required
true
Type
ComponentChild
Default
none
...rest
Required
false
Type
ComponentProps<"textarea">
Default
none
Notes
See the docs for rest parameters. For
Textarea
, you could pass anything you normally would pass to <textarea>
because the return value looks something like this:<textarea
class={className}
{...resstWithoutClass}
>
{children}
</textarea>