Input Modifiers

Learn input modifiers in Vue.js.

We'll cover the following...

Like the event modifiers, Vue.js also offers input modifiers. The input modifiers allow formatting the user input or modifying the events triggered by the user input. The input modifiers are used with the v-model directive.

There are three popular input modifiers listed below.

  • .trim
  • .number
  • .lazy

Dive into the details of each popular input modifier in this lesson.

svg viewer

.trim

.trim is an input modifier that is used to remove whitespace from the start and end of the user input. The input will be trimmed and it will remain from the first ...