UNPKG

@raahimkhan23/react-native-responsive-utils

Version:

A lightweight utility package for making React Native apps responsive across different screen sizes. It allows you to scale widths, heights, fonts, and images based on a configurable base screen size, enabling consistent layouts on different devices. The

163 lines (162 loc) 4.34 kB
{ "name": "@raahimkhan23/react-native-responsive-utils", "version": "0.3.0", "description": "A lightweight utility package for making React Native apps responsive across different screen sizes. It allows you to scale widths, heights, fonts, and images based on a configurable base screen size, enabling consistent layouts on different devices. The package includes both percentage based helpers as well as pixel based scaling functions for flexible UI design. It also supports listening to orientation changes and updating screen dimensions in real time. The utilities are designed to be minimal, easy to integrate, and highly effective for maintaining visual balance across screen types.", "source": "./src/index.tsx", "main": "./lib/module/index.js", "exports": { ".": { "types": "./lib/typescript/src/index.d.ts", "default": "./lib/module/index.js" }, "./package.json": "./package.json" }, "files": [ "src", "lib", "android", "ios", "cpp", "*.podspec", "react-native.config.js", "!ios/build", "!android/build", "!android/gradle", "!android/gradlew", "!android/gradlew.bat", "!android/local.properties", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__", "!**/.*" ], "scripts": { "example": "yarn workspace @raahimkhan23/react-native-responsive-utils-example", "test": "jest", "typecheck": "tsc", "lint": "eslint \"**/*.{js,ts,tsx}\"", "lint:fix": "yarn lint --fix", "clean": "del-cli lib", "prepare": "bob build", "release": "release-it" }, "keywords": [ "react-native", "responsive-ui", "responsive-view", "responsive-screen", "responsive", "scaling", "ui-design", "screen-size", "mobile-ui", "adaptive", "cross-platform" ], "repository": { "type": "git", "url": "git+https://github.com/raahimkhan/react-native-responsive-utils.git" }, "author": "Muhammad Raahim Khan <muhammadr915@gmail.com> (https://github.com/raahimkhan)", "license": "MIT", "bugs": { "url": "https://github.com/raahimkhan/react-native-responsive-utils/issues" }, "homepage": "https://github.com/raahimkhan/react-native-responsive-utils#readme", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }, "devDependencies": { "@commitlint/config-conventional": "^19.6.0", "@eslint/compat": "^1.2.7", "@eslint/eslintrc": "^3.3.0", "@eslint/js": "^9.22.0", "@evilmartians/lefthook": "^1.5.0", "@react-native/eslint-config": "^0.78.0", "@release-it/conventional-changelog": "^9.0.2", "@types/jest": "^29.5.5", "@types/react": "^19.0.12", "commitlint": "^19.6.1", "del-cli": "^5.1.0", "eslint": "^9.22.0", "eslint-config-prettier": "^10.1.1", "eslint-plugin-prettier": "^5.2.3", "jest": "^29.7.0", "prettier": "^3.0.3", "react": "19.0.0", "react-native": "0.79.5", "react-native-builder-bob": "^0.38.3", "release-it": "^17.10.0", "typescript": "^5.2.2" }, "peerDependencies": { "react": "*", "react-native": "*" }, "workspaces": [ "example" ], "packageManager": "yarn@3.6.1", "jest": { "preset": "react-native", "modulePathIgnorePatterns": [ "<rootDir>/example/node_modules", "<rootDir>/lib/" ] }, "commitlint": { "extends": [ "@commitlint/config-conventional" ] }, "release-it": { "git": { "commitMessage": "chore: release ${version}", "tagName": "v${version}" }, "npm": { "publish": true }, "github": { "release": true }, "plugins": { "@release-it/conventional-changelog": { "preset": { "name": "angular" } } } }, "prettier": { "quoteProps": "consistent", "singleQuote": true, "tabWidth": 2, "trailingComma": "es5", "useTabs": false }, "react-native-builder-bob": { "source": "src", "output": "lib", "targets": [ [ "module", { "esm": true } ], [ "typescript", { "project": "tsconfig.build.json" } ] ] }, "create-react-native-library": { "languages": "js", "type": "library", "version": "0.49.2" } }