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

mockupphone

v0.3.0

Published

Drop-in framed mobile preview component for React / Next.js. Wraps any URL in an iframe styled as iPhone, Pixel, BlackBerry, Razr, or LG enV2 — with a built-in host switcher.

Readme

mockupphone

Drop-in framed mobile preview component for React / Next.js. Wraps any URL in an iframe styled as a phone or tablet, with built-in host and device switchers.

Devices included — iPhone 17 / 17 Pro / 17 Pro Max / 17 Air / 17e, iPhone 16 Pro / Pro Max, iPhone 15 Pro, iPhone SE; Pixel 10 / 10 Pro / 10 Pro XL, Pixel 8; Galaxy S25 / S25+ / S25 Ultra, S24 Ultra; iPad Pro 11", Galaxy Tab S9; and retro: BlackBerry, Motorola Razr V3, LG enV2.

Install

npm install mockupphone

Works with Next.js, Vite, CRA, or any React 18+ setup. No additional config required.

Usage

Single device

import PhoneMock from 'mockupphone';

<PhoneMock
  frame="iphone-17-pro"
  hosts={[
    { label: 'local',   url: 'http://localhost:3000' },
    { label: 'staging', url: 'https://staging.myapp.com' },
    { label: 'prod',    url: 'https://myapp.com' },
  ]}
  path="/landing"
/>

Built-in device picker

Pass frames to render a "Device" dropdown alongside the host dropdown.

<PhoneMock
  frames={['iphone-17-pro', 'pixel-10', 'razr-v3']}
  hosts={[...]}
/>

Family-specific components

import { IPhoneMockup, AndroidMockup, IPadMockup, AndroidTabMockup } from 'mockupphone';

<IPhoneMockup     hosts={[...]} />  // picker scoped to iPhones
<AndroidMockup    hosts={[...]} />  // Pixel + Galaxy phones
<IPadMockup       hosts={[...]} />  // iPad Pro
<AndroidTabMockup hosts={[...]} />  // Galaxy Tab

Each accepts every PhoneMock prop. Pass frame for a single device, or frames for a custom subset.

Presets

import PhoneMock, { MODERN_FRAMES, RETRO_FRAMES, ALL_FRAMES } from 'mockupphone';

<PhoneMock frames={MODERN_FRAMES} hosts={[...]} />

Props (PhoneMock)

| Prop | Type | Default | Notes | | -------------- | ------------------------------------- | ----------------- | ----------------------------------------------------------- | | hosts | (string \| { label, url })[] | — | Required. Hosts shown in the dropdown. | | defaultHost | string | first host's url | Uncontrolled starting host. | | path | string | '/' | Appended to the selected host. | | frame | PhoneFrame | 'iphone-17-pro' | Single-frame mode. | | frames | PhoneFrame[] | — | Picker mode. Renders a Device dropdown. | | defaultFrame | PhoneFrame | first in frames | Initial frame in picker mode. | | scale | number | per-frame | Override the default visual scale. | | hideSwitcher | boolean | false | Hide the dropdowns above the frame. | | hideChrome | boolean | false | Hide simulated status bar / notch / home indicator. | | host | string | — | Controlled host. Pair with onHostChange. | | onHostChange | (url: string) => void | — | Fires when the user changes hosts. |

Frame ids

iphone-17-pro-max | iphone-17-pro | iphone-17-air | iphone-17 | iphone-17e
iphone-16-pro-max | iphone-16-pro | iphone-15-pro | iphone-se
pixel-10-pro-xl | pixel-10-pro | pixel-10 | pixel-8
galaxy-s25-ultra | galaxy-s25-plus | galaxy-s25 | galaxy-s24-ultra
ipad-pro-11 | galaxy-tab-s9
blackberry | razr-v3 | lg-env2

Also exported: IPHONE_FRAMES, ANDROID_PHONE_FRAMES, IPAD_FRAMES, ANDROID_TAB_FRAMES, MODERN_FRAMES, RETRO_FRAMES, ALL_FRAMES, FRAME_LABELS.

iframe limitations

Sites that send X-Frame-Options: DENY or restrictive frame-ancestors CSP (most big production sites) can't render in an iframe. Your own apps will be fine.

Local development

npm install
npm run dev

Opens a demo page at http://localhost:3000 with frame switcher, retro/modern filter, and built-in demo content.