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 🙏

© 2026 – Pkg Stats / Ryan Hefner

quickux

v2.0.0

Published

Modern UX best practices on autopilot. Automatic cursor styles, keyboard shortcuts, focus management, and accessibility enhancements.

Readme

QuickUX

Modern UX best practices on autopilot. Drop in two files and instantly get automatic cursor styles, keyboard shortcuts, focus management, and accessibility enhancements.

Features

  • Cursor Management - Automatic pointer cursor on interactive elements, text cursor on inputs
  • Keyboard Shortcuts - Enter submits forms, Escape closes modals, Space activates buttons
  • Focus Management - Beautiful focus indicators and focus trapping in modals
  • Form Enhancements - Prevent double-submit, auto-scroll to validation errors
  • Accessibility - WCAG-compliant focus states, reduced motion support
  • Mobile-Friendly - Larger touch targets, optimized for touch devices
  • Zero Config - Works automatically, opt-out with data-no-ux-autopilot

Installation

NPM

npm install quickux

CDN

<link rel="stylesheet" href="https://unpkg.com/quickux/quickux.css">
<script src="https://unpkg.com/quickux/quickux.js"></script>

Download

Download quickux.css and quickux.js and add them to your project.

Usage

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="quickux.css">
</head>
<body>
  <h1>Your Website</h1>
  <button>I automatically get cursor: pointer!</button>
  
  <script src="quickux.js"></script>
</body>
</html>

That's it! All UX enhancements are now active.

Examples

Keyboard Shortcuts

<!-- Enter key submits this form -->
<form>
  <input type="text" placeholder="Type and press Enter">
  <button type="submit">Submit</button>
</form>

<!-- Escape closes this modal -->
<dialog open class="modal">
  <p>Press Escape to close</p>
</dialog>

Opt-Out

<!-- Disable for specific elements -->
<button class="no-quickux">Custom cursor</button>

<!-- Disable for entire section -->
<div class="no-quickux">
  <button>No auto styles here</button>
</div>

Modal Focus Trap

<dialog id="myModal">
  <h2>Modal Title</h2>
  <input type="text" placeholder="Focus stays trapped">
  <button>Close</button>
</dialog>

<script>
  document.getElementById('myModal').showModal();
  // Focus is automatically trapped, Tab cycles through modal elements
</script>

What Gets Applied

CSS Enhancements

  • cursor: pointer on buttons, links, and interactive elements
  • cursor: text on text inputs
  • cursor: not-allowed on disabled elements
  • focus-visible outlines for keyboard navigation
  • Touch-friendly sizing on mobile (44px minimum)
  • Smooth scrolling and animations
  • Modal backdrops with blur effect

JavaScript Behaviors

  • Enter key submits forms (Ctrl+Enter in textareas)
  • Escape key closes modals/dialogs
  • Space bar activates elements with role="button"
  • Focus trapping in modals and dialogs
  • Double-submit prevention on forms
  • Auto-scroll to first validation error

Configuration

QuickUX works automatically with zero configuration. To disable for specific elements, add the no-quickux class:

<button class="no-quickux">Not affected</button>

Browser Support

  • Chrome/Edge (latest 2 versions)
  • Firefox (latest 2 versions)
  • Safari (latest 2 versions)
  • Mobile browsers (iOS Safari, Chrome Android)

License

MIT © 2025

Contributing

Contributions welcome! Please open an issue or submit a pull request.

Resources

🚫 Opting Out

Don't want the auto-magic on a specific element? Just add the opt-out attribute/class:

CSS Opt-Out

<!-- Disable CSS auto-styles -->
<button class="no-ux-autopilot">
  I won't get automatic cursor or focus styles
</button>

JavaScript Opt-Out

<!-- Disable JS behaviors -->
<form data-no-ux-autopilot>
  <!-- Enter key won't submit this form -->
  <input type="text">
</form>

Opt-Out Entire Sections

<div class="no-ux-autopilot" data-no-ux-autopilot>
  <!-- Everything inside here is excluded from all UX Autopilot features -->
  <button>Normal button</button>
  <form>Normal form</form>
</div>

🎮 Examples

Enter Key Submits Forms

<form>
  <input type="text" placeholder="Type and press Enter">
  <button type="submit">Submit</button>
</form>
<!-- Pressing Enter in the input will submit the form -->

Auto-Save Form Data

<form data-autosave="contact-form">
  <input name="email" type="email">
  <textarea name="message"></textarea>
  <!-- Data is automatically saved to localStorage as you type -->
</form>

Clickable Table Rows

<table>
  <tr data-href="/user/1">
    <td>John Doe</td>
    <td>[email protected]</td>
  </tr>
  <!-- Clicking the row navigates to /user/1 -->
  <!-- Ctrl+Click opens in new tab -->
</table>

Destructive Action Confirmation

<button class="delete">
  Delete Account
</button>
<!-- Automatically shows confirmation dialog -->

<button class="danger" data-confirm-message="This will permanently delete all your data!">
  Delete Everything
</button>
<!-- Custom confirmation message -->

Modal with Focus Trap

<dialog open>
  <h2>Welcome</h2>
  <input type="text">
  <button>Close</button>
  <!-- Tab key cycles through focusable elements -->
  <!-- Escape key closes the dialog -->
  <!-- Focus is trapped inside -->
</dialog>

Smart Floating Labels

<div style="position: relative">
  <input type="text" data-smart-placeholder="Your Email">
</div>
<!-- Label floats up when focused or filled -->

Tooltips

<button data-tooltip="Save your changes">
  💾 Save
</button>
<!-- Hover to see tooltip -->

⚙️ Configuration

Customize JavaScript behaviors:

<script>
  // Configure before the script loads
  window.UXAutopilot.init({
    enterSubmitsForm: true,        // Enter key submits forms
    escapeClosesModal: true,       // Escape closes modals
    spaceActivatesButtons: true,   // Space activates buttons
    arrowKeyNavigation: true,      // Arrow key navigation in lists
    autoFocusTrap: true,          // Trap focus in modals
    preventDoubleSubmit: true,     // Prevent double submission
    autoScrollToError: true,       // Scroll to validation errors
    confirmDestructive: true       // Confirm delete/remove actions
  });
</script>

Or disable specific features:

UXAutopilot.init({
  enterSubmitsForm: false,  // Disable Enter key submission
  confirmDestructive: false // Disable confirmation prompts
});

🎨 CSS Custom Properties

Override default styles with CSS variables:

:root {
  --ux-focus-color: #4A90E2;
  --ux-focus-width: 2px;
  --ux-focus-offset: 2px;
}

📊 Browser Support

  • ✅ Chrome/Edge (modern)
  • ✅ Firefox (modern)
  • ✅ Safari (modern)
  • ✅ Mobile browsers
  • ✅ Progressive enhancement (graceful degradation)

🤔 Philosophy

UX Autopilot follows these principles:

  1. Auto-apply best practices - Good UX should be the default
  2. Easy opt-out - One class/attribute disables everything
  3. Zero dependencies - Pure CSS and Vanilla JS
  4. Progressive enhancement - Works everywhere, better in modern browsers
  5. Accessibility first - WCAG compliance built-in
  6. Mobile-friendly - Touch and small screens are first-class citizens

📦 What's Included

ux-autopilot/
├── ux-autopilot.css       # All CSS utilities and auto-styles
├── ux-autopilot.js        # All JavaScript behaviors
├── README.md              # This file
├── package.json           # NPM package config
└── demo.html              # Live examples

🐛 Known Limitations

  • Some features require modern browsers (focus-visible, :has, etc.)
  • Custom form controls may need manual adjustment
  • Some CSS frameworks may conflict (use opt-out)

🤝 Contributing

This is a simple, focused library. Contributions welcome for:

  • Bug fixes
  • Browser compatibility improvements
  • Documentation improvements
  • New utility features (if they're truly universal best practices)

📄 License

MIT License - Use freely in personal and commercial projects

🙏 Credits

Inspired by modern UX best practices and accessibility guidelines from:

  • WCAG 2.1
  • Material Design
  • Apple HIG
  • Microsoft Fluent Design

Made with ❤️ for better web experiences

Got questions? Found a bug? Open an issue