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

@react-simplikit/mobile

v0.0.2

Published

Mobile web utilities for React - fixing viewport, keyboard, and layout issues

Readme

@react-simplikit/mobile

npm version MIT License

English | 한국어

Mobile web utilities for React - fixing viewport, keyboard, and layout issues on iOS Safari and Android Chrome.

Why?

Mobile web development is hard. iOS Safari and Android Chrome have quirks that cause:

  • Viewport height changes when keyboard opens
  • Body scroll issues with modals
  • Safe area inset handling
  • Visual viewport inconsistencies

@react-simplikit/mobile provides battle-tested solutions for these common problems.

Features

  • Keyboard handling - Avoid content being hidden by virtual keyboard
  • Body scroll lock - Prevent background scroll in modals
  • Visual viewport - Track actual visible area
  • Safe area - Handle notch and home indicator
  • Device detection - Detect iOS, Android, and browser types
  • SSR-safe - Works with Next.js and other SSR frameworks

Installation

npm install @react-simplikit/mobile
# or
yarn add @react-simplikit/mobile
# or
pnpm add @react-simplikit/mobile

Quick Start

Keyboard Avoiding View

import { useAvoidKeyboard } from '@react-simplikit/mobile';

function ChatInput() {
  const { ref, style } = useAvoidKeyboard();

  return (
    <div ref={ref} style={style}>
      <input type="text" placeholder="Type a message..." />
    </div>
  );
}

Body Scroll Lock

import { useBodyScrollLock } from '@react-simplikit/mobile';

function Modal({ isOpen, children }) {
  useBodyScrollLock(isOpen);

  if (!isOpen) return null;
  return <div className="modal">{children}</div>;
}

Visual Viewport

import { useVisualViewport } from '@react-simplikit/mobile';

function Component() {
  const viewport = useVisualViewport();

  return (
    <div style={{ height: viewport.height }}>
      Actual visible height: {viewport.height}px
    </div>
  );
}

What's Included

Hooks

| Hook | Description | | -------------------- | -------------------------------------- | | useAvoidKeyboard | Avoid content being hidden by keyboard | | useBodyScrollLock | Lock body scroll (for modals) | | useVisualViewport | Track visual viewport size | | useScrollDirection | Detect scroll direction | | useNetworkStatus | Monitor network connectivity | | usePageVisibility | Track page visibility state |

Utilities

| Utility | Description | | --------------------- | ------------------------------ | | bodyScrollLock | Imperative scroll lock control | | getSafeArea | Get safe area insets | | getKeyboardHeight | Estimate keyboard height | | isIOS / isAndroid | Device detection | | isServer | SSR environment check |

Browser Support

  • iOS Safari 13+
  • Android Chrome 80+
  • Desktop browsers (graceful fallback)

Related Packages

Contributing

We welcome contributions! Please see our Contributing Guide.

License

MIT © Viva Republica, Inc. See LICENSE for details.