Skip to content

Kirby 3.5.7.1

Textarea Input

<k-textarea-input>

<k-input v-model="text" name="text" type="textarea" />

Props

after

String (default: null)

Text that is shown after the input (right before the icon)

autofocus

Boolean (default: false)

If true, the input will be instantly focused when the form is created

before

String (default: null)

Text that is shown before the input

buttons

Array|Boolean (default: true)

Enables or disables all or specific buttons in the toolbar.

No toolbar

<k-textarea-field :buttons="false" />

Only selected buttons

<k-textarea-field :buttons="['bold', 'italic']" />

Available buttons:

  • headlines
  • bold
  • italic
  • link
  • email
  • code
  • ol
  • ul

disabled

Boolean (default: false)

If true, the input is disabled and cannot be filled in or edited

icon

String (default: null)

Sets the icon, that is shown on the right next to the input.

id

String (default: null)

The id for the input element.

maxlength

Number (default: null)

The maximum number of accepted characters

minlength

Number (default: null)

The minimum number of required characters. When the input is not required, empty values are still accepted, even if a minlength is set.

name

String (default: null)

The name of the input element.

placeholder

String (default: null)

A placeholder, that is being shown in the input, as long as no value is entered yet.

required

Boolean (default: false)

If true, the input must not be empty

size

String (default: null)

Pre-selects the size before auto-sizing kicks in. This can be useful to fill gaps in field layouts. Available sizes:

  • small
  • medium
  • large
  • huge

spellcheck

Boolean (default: null)

If false, spellchecking will be switched off.

theme

String (default: null)

By default, inputs are as unstyled as possible to provide a clean boilerplate. If you need the typical field input look, you can set the theme to field

value / v-model

String (default: null)

Methods

focus()

The focus event can be used to set the focus on the input.

Events

@input

The input event is triggered when the value changes.

@invalid

The invalid event is triggered when the input validation fails. This can be used to react on errors immediately.

CSS class

.k-textarea-input