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

@object-ui/mobile

v4.8.0

Published

Mobile optimization for Object UI with responsive components, PWA support, and touch gesture handling.

Readme

@object-ui/mobile

Mobile optimization for Object UI — responsive hooks, gesture support, touch targets, and PWA utilities.

Features

  • 📱 Responsive Hooks - useBreakpoint and useResponsive for adaptive layouts
  • 👆 Gesture Support - useGesture and useSpecGesture for swipe, pinch, and long-press detection
  • 🔄 Pull to Refresh - Native pull-to-refresh behavior with usePullToRefresh
  • 🎯 Touch Targets - useTouchTarget for accessible minimum-size touch areas
  • 📐 Responsive Containers - ResponsiveContainer for breakpoint-aware rendering
  • 🏗️ MobileProvider - Context provider for mobile-aware applications
  • 📲 PWA Support - Manifest generation and service worker registration
  • ⚙️ Configurable Breakpoints - Customizable breakpoint definitions

Installation

npm install @object-ui/mobile

Peer Dependencies:

  • react ^18.0.0 || ^19.0.0
  • react-dom ^18.0.0 || ^19.0.0

Quick Start

import { MobileProvider, useBreakpoint, useGesture } from '@object-ui/mobile';

function App() {
  return (
    <MobileProvider>
      <ResponsiveApp />
    </MobileProvider>
  );
}

function ResponsiveApp() {
  const { isMobile, isTablet, isDesktop } = useBreakpoint();

  return (
    <div>
      {isMobile && <MobileNav />}
      {isDesktop && <DesktopSidebar />}
      <MainContent />
    </div>
  );
}

API

MobileProvider

Wraps your application with mobile context:

<MobileProvider>
  <App />
</MobileProvider>

useBreakpoint

Hook for detecting the current breakpoint:

const { isMobile, isTablet, isDesktop, current } = useBreakpoint();

useResponsive

Hook for responsive values based on screen size:

const columns = useResponsive({ mobile: 1, tablet: 2, desktop: 4 });

useGesture / useSpecGesture

Hooks for gesture detection on touch devices:

const gestureRef = useGesture({
  onSwipeLeft: () => navigateNext(),
  onSwipeRight: () => navigateBack(),
  onPinch: (scale) => handleZoom(scale),
});

return <div ref={gestureRef}>Swipeable content</div>;

usePullToRefresh

Hook for pull-to-refresh behavior:

const { isRefreshing } = usePullToRefresh({
  onRefresh: async () => await fetchData(),
});

useTouchTarget

Hook for ensuring minimum touch target sizes:

const { targetProps } = useTouchTarget({ minSize: 44 });
return <button {...targetProps}>Tap me</button>;

ResponsiveContainer

Renders children based on breakpoint:

<ResponsiveContainer mobile={<MobileView />} desktop={<DesktopView />} />

PWA Utilities

import { generatePWAManifest, registerServiceWorker } from '@object-ui/mobile';

const manifest = generatePWAManifest({ name: 'My App', themeColor: '#000' });
registerServiceWorker({ cacheStrategy: 'network-first' });

Compatibility

  • React: 18.x or 19.x
  • Node.js: ≥ 18
  • TypeScript: ≥ 5.0 (strict mode)
  • @objectstack/spec: ^3.3.0
  • @objectstack/client: ^3.3.0
  • Tailwind CSS: ≥ 3.4 (for packages with UI)

Links

License

MIT — see LICENSE.