🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

react-focus-onkeydown

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-focus-onkeydown

React higher order component for getting focus of a component when a key is pressed anywhere in the page

Source
npmnpm
Version
2.1.1
Version published
Weekly downloads
44
37.5%
Maintainers
1
Weekly downloads
 
Created
Source

react-focus-onkeydown

Travis npm package Coverage Status Dependency Status devDependency Status

React higher order component for getting focus of a component when a key is pressed anywhere in the page

Live demo

You can see the simplest demo here: Live demo

Install

$ npm install --save react-focus-onkeydown

Usage

import React, { propTypes } from 'react';
import focusOnKeyDown from 'react-focus-onkeydown';

const EnhancedInput = focusOnKeyDown("input");
const () => (
  // Typing any key will trigger aa focus on the input below
  <EnhancedInput />
)

Props

focusOnKeyDown

Type: boolean, default: true

Activates or deactivates focus feature

TODO

  • Improve examples

License

See the LICENSE file for license rights and limitations (MIT).

Keywords

react-component

FAQs

Package last updated on 25 Oct 2018

Did you know?

Socket

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