Socket
Socket
Sign inDemoInstall

@nomnes/vue-autofocus

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nomnes/vue-autofocus

vue autofocus directive


Version published
Weekly downloads
4
Maintainers
1
Install size
1.92 kB
Created
Weekly downloads
 

Readme

Source

@nomnes/vue-autofocus

Autofocus directive for Vue

npm install @nomnes/vue-autofocus
#or
yarn add @nomnes/vue-autofocus

Usage

import Vue from "vue";
import autofocus from "@nomnes/vue-autofocus";

Vue.use(autofocus);

or

import Vue from "vue";
import { autofocus } from "@nomnes/vue-autofocus";

Vue.directive("autofocus", autofocus);

and then in template:

<input v-autofocus/>

Options

When used as a plugin, the name of the directive can be passed using the options:

import Vue from "vue";
import autofocus from "@nomnes/vue-autofocus";

Vue.use(autofocus, { name: 'autofocus' });

FAQs

Last updated on 27 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc