🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

uxlift

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

uxlift

UXLift is a lightweight utility library designed to elevate front-end user experience (UX).

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

uxlift

UXLift is a lightweight utility library designed to elevate front-end user experience (UX). It provides helpers and patterns for focus management, keyboard navigation, smooth interactions, and accessibility enhancements — all with minimal dependencies.

✨ Features

  • 🎯 Focus management helpers
  • 🎹 Keyboard interaction utilities
  • 🪄 Smooth animation triggers
  • ♿ Accessibility-first utilities
  • 🧱 Framework-agnostic and tiny footprint

📦 Installation

npm install uxlift

or with yarn:

yarn add uxlift

🚀 Usage

import { trapFocus, smoothScrollTo, onKeyCombo } from 'uxlift';

// Trap focus inside a modal
trapFocus(document.querySelector('#my-modal'));

// Smooth scroll to an element
smoothScrollTo(document.querySelector('#features'));

// Keyboard shortcut: Ctrl + /
onKeyCombo('Control+/', () => {
  console.log('Shortcut triggered!');
});

📚 API Reference

trapFocus(container: HTMLElement)

Locks focus within a container (e.g., modal or dialog) to improve keyboard navigation.

smoothScrollTo(element: HTMLElement, options?: ScrollOptions)

Smoothly scrolls to an element with optional behavior ({ behavior: 'smooth', block: 'start' }).

onKeyCombo(combo: string, callback: Function)

Registers a keyboard shortcut. Combos like 'Control+/', 'Shift+Enter', etc.

🌐 Compatibility

  • Works with all modern browsers
  • No dependencies
  • Ideal for SPA frameworks (React, Vue, Svelte) or vanilla JS

🧪 Coming Soon

  • Focus ring styling
  • Dynamic ARIA attribute toggling
  • Prefetching on hover (UX optimization)

🤝 Contributing

Contributions are welcome! Please open issues or submit PRs.

📄 License

MIT © 2025

Keywords

log

FAQs

Package last updated on 19 Jun 2025

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