<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
•291 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
Solving Laravel Access denied for user 'homestead'@'localhost' the Easy Way
2 years ago

How to Add Disqus comment system to Laravel Application
2 years ago

Laravel with relationship but use join syntax
2 years ago

Laravel Valet Change PHP Version on MacOS
2 years ago

Laravel Check Current Environment
2 years ago

How to Cache Everything on Laravel Forge Deploy Scripts
1 year ago