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-native-responsive-metrics

v1.1.0

Published

Responsive scaling utilities for React Native — phones and tablets

Readme

react-native-responsive-metrics

npm version license

Responsive scaling utilities for React Native. Scales UI consistently across phones and tablets based on a baseline design size of 390×844 (iPhone 14).

Made by Umang Thakkar


Installation

npm install react-native-responsive-metrics
# or
yarn add react-native-responsive-metrics

Usage

import {
  horizontalScale,
  verticalScale,
  moderateScale,
  responsiveFontSize,
  getResponsiveIconSize,
  isTablet,
} from "react-native-responsive-metrics";

const styles = StyleSheet.create({
  container: {
    paddingHorizontal: horizontalScale(16),
    paddingVertical: verticalScale(12),
    borderRadius: moderateScale(8),
  },
  title: {
    fontSize: responsiveFontSize(18),
  },
  icon: {
    width: getResponsiveIconSize(24),
    height: getResponsiveIconSize(24),
  },
});

API

| Function | Signature | Description | | ----------------------- | ------------------------------------------- | ------------------------------------------------------------------- | | horizontalScale | (size: number) => number | Scales based on screen width | | verticalScale | (size: number) => number | Scales based on screen height | | moderateScale | (size: number, factor?: number) => number | Balanced scale, less aggressive (default factor: 0.5) | | responsiveFontSize | (size: number) => number | Font size scaled to screen width, pixel-rounded for crisp rendering | | getResponsiveIconSize | (baseSize?: number) => number | Scales icon size to smallest screen dimension | | isTablet | boolean | true if device width ≥ 768px |


When to use which

| Function | Best for | | ----------------------- | ----------------------------- | | horizontalScale | padding, margin, width | | verticalScale | height, top/bottom spacing | | moderateScale | border radius, general sizing | | responsiveFontSize | all text / font sizes | | getResponsiveIconSize | SVG icons, image sizes |


Baseline

| Property | Value | | --------------------- | ------------------- | | Design width | 390px (iPhone 14) | | Design height | 844px (iPhone 14) | | Tablet max width cap | 550px | | Tablet max height cap | 900px |


Also check out

🗂 React Native Base Template — A ready-to-use React Native project structure to get started fast.

👉 @umang-thakkar/base-template on npm


License

MIT © Umang Thakkar