<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
•70 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 Solve Laravel Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
8 months ago

How to Comment Configuration in Laravel .env File (Environment)?
8 months ago

Laravel Inertia Nav Link Component
1 week ago

Route Model Binding in Laravel 8
11 months ago
![How to Fix Laravel Artisan Seed Command Return [ReflectionException] Class Seeder Does not Exist cover](https://cdn.postsrc.com/images/snippets/how-to-fix-laravel-artisan-seed-command-return-reflection-exception.jpeg)
How to Fix Laravel Artisan Seed Command Return [ReflectionException] Class Seeder Does not Exist
8 months ago

How to Clear Cache in Laravel
11 months ago