1.0.0 • Published 4 years ago

react-keyboard-only-outlines v1.0.0

Weekly downloads
184
License
MIT
Repository
github
Last release
4 years ago

react-keyboard-outlines

NPM version Downloads Build Status Coverage Status Dependency status Dev Dependency status

A component that enables keyboard-only-outlines so that outlines are only visible when using the keyboard.

Installation

$ npm install react-keyboard-only-outlines

This library is written in modern JavaScript and is published in both CommonJS and ES module transpiled variants. If you target older browsers please make sure to transpile accordingly.

Usage

You should use this component just once in your project:

import KeyboardOnlyOutlines from 'react-keyboard-only-outlines';

<KeyboardOnlyOutlines>
    <MyApp />
</KeyboardOnlyOutlines>

Props

nametypedefaultdescription
stylesheetTargetDOM NodeSee keyboard-only-outlinesThe DOM node where to insert the stylesheet with styles to disable the outlines
stylesstringSee keyboard-only-outlinesThe styles to apply when a focus event is caused by mouse navigation

Tests

$ npm test
$ npm test -- --watch # during development

License

Released under the MIT License.