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

With label and append slots

You can use the label and append slots to customize the label and the append element.

With hint and state

You can use the hint attribute to display a hint message. This will replace the label.

Disabled

Props, Event & Slots

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
T-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'
roundedSizeSize radius of the component's border
@values 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'
union-
paddingIf the textarea has a padding
@default true
boolean-true
transparentIf the textarea has a transparent background
@default false
boolean-false
borderIf the textarea has no border
@default false
boolean-true
appendJustifyThe alignment of the append slot
@values 'start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'
@default 'end'
union-'end'

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

Slots

NameDescriptionBindings
LabelReplace the label
AppendReplace the append