Skip to content

MazTextarea

MazTextarea is a standalone component that replaces the standard html textarea input with a beautiful design system. Many options like colors, disabled, error, warning, success and error messages are available.

INFO

Before you have to import the global css files in your project, follow instructions in Getting Started

INFO

This component has the "autogrow" feature, so when the user writes, the textarea expands automatically

Basic usage

vue
<template>
  <MazTextarea
    v-model="value"
    name="comment"
    id="comment"
    label="Enter your comment"
  />
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import MazTextarea from 'maz-ui/components/MazTextarea'

  const value = ref()
</script>

Props & Event

Props

Prop nameDescriptionTypeValuesDefault
styleStyle attribut of the component root elementTSIndexedAccessType-undefined
classClass attribut of the component root elementTSIndexedAccessType-undefined
modelValue
@model The value of the textarea
string-undefined
idThe id of the textareastring-undefined
nameThe name of the textareastring-'MazTextarea'
labelThe label of the textareastring-undefined
placeholderThe placeholder of the textareastring-undefined
requiredIf the textarea is requiredboolean-false
disabledIf the textarea is disabledboolean-false
readonlyIf the textarea is readonlyboolean-false
errorIf the textarea has an errorboolean-false
successIf the textarea has a successboolean-false
warningIf the textarea has a warningboolean-false
hintThe hint of the textareastring-undefined
colorThe color of the textareaColor-'primary'

Events

Event namePropertiesDescription
update:model-valuevalue string | undefined - The value of the textareaEmitted when the value of the textarea change
inputvalue string | undefined - The value of the textareaEmitted when the value of the textarea change
focusvalue Event - The eventEmitted when the textarea is focused
blurvalue Event - The eventEmitted when the textarea is blurred
changevalue Event - The eventEmitted when the textarea value change