<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
•301 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 SnippetsHow to Rendered Blade View as a String in Laravel
2 years ago
How to Associate and Dissociate Relationship in Laravel
2 years ago
PhpStorm Plugin For Laravel Developer
2 years ago
Laravel Wildcard Subdomain Routing
2 years ago
How to Copy Text From Textarea Using JavaScript
2 years ago
How to get query builder to output its raw SQL query as a string in Laravel?
2 years ago