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 🙏

© 2024 – Pkg Stats / Ryan Hefner

slick-sizer-ui

v1.0.0

Published

This library will help you to make your mobile app responsive as per phone dimensions

Downloads

8

Readme

slick-sizer-ui

"Let's make your mobile app responsive😍!"

Are you tired of dealing with different device dimensions in your mobile app development?
Look no further! slick-sizer-ui is here to save the day. This library calculates your mobile or tablet device dimensions and provides you with three handy functions: *slickHeight, slickWidth and slickFontSize. Whether you're developing for Android or iOS, with or without a notch, this library has got you covered! 📱🙌

Compatible with Expo & React Native Apps📱

We have verified this works with both type of native apps🔥. This works with notch and without notch devices. you dont have worry about it. just use it🙌🔥

installation and usages

using npm

npm i slick-sizer-ui

using yarn

yarn add slick-sizer-ui

usages

  • slickHeight - works with vertical dimensions(height) of your phone📱
import { slickHeight } from "slick-sizer-ui";

const myComponentStyles = StyleSheet.create({
  container: {
    height: slickHeight(30), // 30% of the mobile screen height
  },
});
  • slickWidth - works with horizontal dimensions(width) of your phone📱
import { slickWidth } from "slick-sizer-ui";

const myComponentStyles = StyleSheet.create({
  container: {
    width: slickWidth(50), // 50% of the mobile screen width
  },
});
  • slickFontSize - works automatically as per requirtement. if your phone width < height then it takes width%. if not then it take height% for fontSize.
import { slickFontSize } from "slick-sizer-ui";

const myComponentStyles = StyleSheet.create({
  textStyle: {
    fontSize: slickFontSize(5), // 5% of the screen width/height (depending on which is less)
  },
});

code example

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { slickHeight, slickWidth, slickFontSize } from "slick-sizer-ui";

export const Example = () => {
  // Your code logic here

  return (
    <View style={styles.container}>
      <Text style={styles.textStyle}>Mobile App</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    justifyContent: "center",
    alignItems: "center",
    height: slickHeight(30), // 30% of the mobile screen height
    width: slickWidth(30), // 30% of the mobile screen width
  },
  textStyle: {
    fontSize: slickFontSize(5), // 5% of the screen width/height (depends on which is less)
  },
});

Now you're all set to create responsive mobile apps with ease using slick-sizer-ui😀. Thank you for choosing our library! 🙌

Feel free to explore and experiment with these functions to make your app truly responsive and user-friendly. Enjoy coding! 😊🚀


For more details and access to the source code, visit the GitHub Repository.