npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-outline-manager

v1.2.2

Published

A simple helper for toggling CSS outlines.

Downloads

179

Readme

React Outline Manager

license npm type definitions

A simple component to help manage focus outlines in React applications. No dependencies.

Includes CJS, ESM, and UMD (supporting browser usage) packages. TypeScript definitions are also included.

How it works

Unlike CSS-only solutions that simply hide outlines on focusable elements, this component can help you to create beautiful web apps without sacrificing accessibility.

When using this component, outlines on focusable elements are hidden until a user begins to interact with keyboard (specifically, the tab key). Optionally, resuming mouse/touch input can hide outlines again.

From version v1.2.0 and above, React v16.2+ is required due to the introduction of Fragment support.

Usage

To install with Yarn:

yarn add react-outline-manager

To install with npm:

npm install --save react-outline-manager

Once installed, simply import React Outline Manager and wrap your your application.

import ReactOutlineManager from 'react-outline-manager';

const MyAppWithOutlineManager = () => (
  <ReactOutlineManager>
    <YourApp />
  </ReactOutlineManager>
);

Only wrapped components will be affected. This means that you can also choose to only wrap a part of you application if desired.

Props

|Prop |Default value |Description| |-----------|---------------------|-----------| |className|ReactOutlineManager|Use this to change the class of the wrapping component. This class is only visible when outlines should be hidden.| |tagName |false |Use this to change the element type used in the wrapping component, such as a div. When false (or omitted), this component renders as a Fragment and the className will be applied to the body tag.| |toggle |false |By default, outlines are enabled when a user hits tab, but not hidden again. Set this option to true if you want outlines to toggle on and off as the user switches between input methods.|

When tagName is set, you may also pass through standard React HTML props. For example:

<ReactOutlineManager onClick={() => {}} />