<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
•192 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 Install Supervisor in Ubuntu for Laravel Project
1 year ago

Best way to run Composer Update in Production
1 year ago

How to Enable TailwindCSS JIT Compiler
1 year ago

Laravel Route View (Don't create controller only to return view)
1 year ago

Caching Queries and Values in Laravel 8
1 year ago

How to Define Vue Js Click Away Directive
1 year ago