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 🙏

© 2025 – Pkg Stats / Ryan Hefner

beautiful-focus

v1.0.1

Published

A library to make the focus on your site beautiful

Downloads

13

Readme

Beautiful Focus

Accessability & Beauty

A simple script to go from an ugly focus ring to a focus that your users are going to want to use.

Don’t let designers know it was this easy...

Paste this into the head of the document

<script src=”https://unpkg.com/beautiful-focus@1.0.0/lib/beautiful-focus.js” />

Features

  • Gorgeous focus ring
  • Only shows Focus whilst navigating with the keyboard
  • Automatically hides when using a mouse
  • Fully customisable

Why beautiful focus

Accessability should be a priority for every web-designer and developer these days. The web was built as an all-inclusive world we can all benefit from.

“The power of the Web is in its universality.
Access by everyone regardless of disability is an essential aspect.” Tim Berners Lee

However we have so much to do! So many things to build and so many features to push. It is often an overthought or a last minute job to try to “Add Accessability” to a website.

Designers hate that blue outline that chrome gives when you click a button...

You’ve done it before right? used the old

&:focus {
    outline: none;
}

Well not anymore, stick Beautiful-Focus into your website, sit back and relax knowing that all users will get a great experience here.

Usage

Below details some useful information when using the Beautiful Focus lib.

Over-ride the styles

Simply style using the css id selector:

#__beautiful-focus {
 /* Your styles go here */
}

Clearing the focus

Sometimes you will want to manually clear the focus ring. To do so simply dispatch a custom window event like so:

const event = new Event('clearFocus');
window.dispatchEvent(event);

Single Page Apps

Single Page Apps will need to inform Beautiful-Focus when the page has changed so it knows to clear itself up.

To do this we need to dispatch the above mention clearFocus event when the page changes.

Contributing

Beautiful Focus is a young project with a long way to go!

We would love you to help out, either by submitting Pr's to help with docs or the library, or just to give feedback on how we could improve!

Next steps

  • Add more info to docs.
  • Add code snippets for SPA's clearing focus on route change
  • many many more...