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

div-phone

v1.1.0

Published

Responsive iPhone frame component with black and orange finishes, built with Tailwind CSS.

Readme

div-phone

div-phone cover

A responsive iPhone frame component for React, built with Tailwind CSS. Use the existing black finish or opt into the orange finish with a single prop.

Install

npm install div-phone

Tailwind CSS setup

div-phone ships Tailwind utility classes rather than a compiled stylesheet. Tailwind CSS v4 ignores node_modules during automatic source detection, so register the package as a source in your main CSS file:

@import "tailwindcss";
@source "../node_modules/div-phone/dist";

The @source path is relative to the CSS file. Adjust the number of ../ segments for your project structure.

If your project uses PostCSS, install the optional integration packages:

npm install --save-dev postcss @tailwindcss/postcss

Then configure the Tailwind v4 plugin:

export default {
	plugins: {
		'@tailwindcss/postcss': {},
	},
};

Usage

The existing black frame remains the default:

import { Phone } from 'div-phone';

export const BlackPhone = () => (
	<Phone>
		<div className="h-full w-full bg-neutral-900 text-white">
			Your app goes here.
		</div>
	</Phone>
);

Select the orange finish with color="orange":

import { Phone } from 'div-phone';

export const OrangePhone = () => (
	<Phone color="orange">
		<div className="h-full w-full bg-neutral-900 text-white">
			Your app goes here.
		</div>
	</Phone>
);

API

| Prop | Type | Default | Description | | --- | --- | --- | --- | | children | React.ReactNode | None | Content rendered inside the phone screen. | | className | string | None | Classes added to the outer phone wrapper. | | color | "black" \| "orange" | "black" | Selects the phone frame finish. | | shadow | boolean | true | Applies the outer phone shadow. |

The color union is also exported for use in your own component APIs:

import type { PhoneColor } from 'div-phone';

Requirements

  • React 17, 18, or 19
  • Tailwind CSS 4
  • PostCSS 8 and @tailwindcss/postcss 4 when using the optional PostCSS integration
  • Node.js 16.14 or newer

Troubleshooting

If the phone renders without its frame styling, confirm that:

  1. Your application imports Tailwind with @import "tailwindcss".
  2. Your CSS includes an @source path that resolves to node_modules/div-phone/dist.
  3. You restarted the development server after installing or updating the package.