Sometimes we may need to create years list (past) for something like a date of birth selection from a drop-down menu (select / option). We can create a year list…
How to shake invalid input field in Vue.js 3 | Example
In this tutorial, we'll have a look at how we can shake the input field box when a user types something invalid. First, we create a class that has an…
Highlight invalid password with red border in Vue.js 3 | Example
We can highlight the border color of an invalid input field, like a password in Vue.js. We can keep a reactive state which will observe whether or not the password…
Display text for a few seconds in Vue.js 3 | Example
Sometimes we may want to show some text or notification for a few seconds and then disappear. We can do that by toggling the visibility of the element for a…
How to disable input text field by a toggle / condition in Vue 3 | Example
In this example, we'll see how we can disable an input field with a toggle or a condition. Sometimes we may want to disable an input field based on user…
How to limit input text characters length using maxlength in Vue 3 | Example
In the previous article, we saw how we can limit the input characters text using a temporary state in Vue.js. In this tutorial, we'll look at how we can do…
Limit input text characters length using temporary states in Vue 3 | Example
In this example, we'll see how we can limit the length of text input (characters) using temporary states. Here's the code example: <script setup> import { ref } from 'vue'…
How to scroll to an element programmatically in Vue 3 | Example
There are multiple ways to scroll to a target element in Vue.js. Here in this tutorial, we're going to see how we can scroll to an element having an id.…
Get value of selected option from select dropdown in Vue 3 | Example
In this article, we'll see how we can get the value of the selected option from a select input in Vue 3. There are multiple ways to achieve this. In…