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

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

NameDescriptionTypeRequiredDefaultPossible values
styleStyle attribut of the component root elementNative typeNoundefined-
classClass attribut of the component root elementNative typeNoundefined-
model-valuev-model
TNoundefined-
idThe id of the textareastringNoundefined-
nameThe name of the textareastringNo'MazTextarea'-
labelThe label of the textareastringNoundefined-
placeholderThe placeholder of the textareastringNoundefined-
requiredIf the textarea is requiredbooleanNofalse-
disabledIf the textarea is disabledbooleanNofalse-
readonlyIf the textarea is readonlybooleanNofalse-
errorIf the textarea has an errorbooleanNofalse-
successIf the textarea has a successbooleanNofalse-
warningIf the textarea has a warningbooleanNofalse-
hintThe hint of the textareastringNoundefined-
colorThe color of the textareaMazColorNo'primary'-
rounded-sizeSize radius of the component's border"none" | "sm" | "md" | "lg" | "xl" | "full"Noundefined'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'
paddingIf the textarea has a paddingbooleanNotrue-
transparentIf the textarea has a transparent backgroundbooleanNofalse-
borderIf the textarea has no borderbooleanNotrue-
append-justifyThe alignment of the append slot"start" | "end" | "center" | "space-between" | "space-around" | "space-evenly"No'end''start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'

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