Textarea

Augmented textarea form field.

Config

The options below are to be set in the global configuration at the following location:

{
  components: {
    textarea: { ... },
  },
}

class

Classes applied to the textarea element, except when the prop bare is set to true. See styling components.

  • type: Array<String | Object> | Object | String | (props: Object) => {}
  • default: null

Example

class: 'field field--textarea'

API

NameTypeDefaultDescription
Props
variant string|arraynull

Useful when used in the component config class option, to style it conditionally. See styling components.

bare booleanfalse

Disable class inheritance from the component config. See styling components.

disabled booleannull

Set the HTML disabled attribute

required booleannull

Set the HTML required attribute

readonly booleannull

Set the HTML readonly attribute

modelValue string|numbernull

Textarea value

Events
update:modelValue

Examples

Controlled

<template>
  <CTextarea v-model="value" />
</template>

<script>
export default {
    data() {
        return {
            value: 'Default value',
        },
    },
}
</script>