<template> <input v-auto-focus type="email" placeholder="Your full name" > </template> <script> Vue.directive('auto-focus', { inserted: el => el.focus() }) </script>
Vue Js Auto Focus Directive
Learn how to define a custom directive in Vue Js to auto focusinput
Created on Sep 11, 2021
•248 views
If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️
Load comments for Vue Js Auto Focus Directive
PostSrc Code Components
Collection of Tailwind CSS components for everyone to use. Browse all of the components that are right for your project.
View ComponentsSponsors 👑
+ Add YoursOther Code Snippets
All Snippets
How to Write PHP Code inside of Laravel Blade Template
1 year ago

Set TailwindCSS Utilities Important
1 year ago

How to Clear Application Cache in Laravel
1 year ago

How to Add Timezones Fields in Laravel Migration
1 year ago

Laravel Inertia Nav Link Component
11 months ago

How to Enable Secure HTTPS in Laravel Valet
11 months ago