Velvet Thunder

Textarea

Sizes

<DemoSpaceX>
  <VelvetTextarea @size="sm" />
  <VelvetTextarea @size="md" />
  <VelvetTextarea @size="lg" />
</DemoSpaceX>

Disabled

<VelvetTextarea @isDisabled={{true}} />

Invalid

<VelvetTextarea @isInvalid={{true}} />

Placeholder

<VelvetTextarea @placeholder="Type something here..." />

Examples

Handle Input Events

Edit this demo

Use the @onInput argument to handle input events.

Value: Value
<DemoSpaceY>
  <div>Value: {{this.value}}</div>
  <VelvetTextarea @onInput={{this.onInput}} @value={{this.value}} />
</DemoSpaceY>

Handle Change Events

Edit this demo

Use the @onChange argument to handle change events.

Value: Value
<DemoSpaceY>
  <div>Value: {{this.value}}</div>
  <VelvetTextarea @onChange={{this.onChange}} @value={{this.value}} />
</DemoSpaceY>

Signature

Element

HTMLTextAreaElement

Blocks

This component does not accept any blocks.

Arguments

NameDescriptionTypeDefault Value
@isDisabledIndicate if the textarea is disabled.booleanfalse
@isInvalidIndicate if the textarea is invalid.booleanfalse
@onChangeHandle the textarea's `change` event.(value: string, event: Event) => voidundefined
@onInputHandle the textarea's `input` event.(value: string, event: Event) => voidundefined
@placeholderThe placeholder of the textarea.string""
@sizeThe size of the textarea.'sm' | 'md' | 'lg'"md"
@valueThe value of the textarea.string""
@variantThe appearance of the textarea.string | 'primary'"primary"
Arguments marked with * are required.
Tag
Tooltip