8000 GitHub - junhoyeo/react-mobile-sized-view: ๐Ÿ‘ Responsive Mobile-sized Wrapper for React - Easily prototype your mobile-sized web apps with desktop support
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

๐Ÿ‘ Responsive Mobile-sized Wrapper for React - Easily prototype your mobile-sized web apps with desktop support

Notifications You must be signed in to change notification settings

junhoyeo/react-mobile-sized-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

react-mobile-sized-view

React Mobile Sized View - ๐Ÿ‘ Responsive Mobile-sized Wrapper for React | Product Hunt

demo image

๐Ÿ‘ Responsive Mobile-sized Wrapper for React

๐Ÿš€ Examples

โš ๏ธ Warning: The following examples can be using the outdated version of this package, and can not be the best usage here(this package was very ugly before I tidy up lol). Please use issues and PRs in this repository for sharing more ideas and suggestions, including proper exploits

๐Ÿš€ Add your apps here too!

๐Ÿ“ฆ Usage

yarn add styled-components && yarn add -D @types/styled-components
yarn add react-mobile-sized-view
import React from 'react';
import MobileSizedView from 'react-mobile-sized-view';

const App: React.FC = () => (
  <MobileSizedView
    style={{ backgroundColor: '#F6DADB' }}
    screenStyle={{
      backgroundColor: '#fefefe',
      boxShadow: '-31px -31px 62px #FAE0E0, 31px 31px 62px #EAB6BE',
    }}
    isRounded
  >
    <h1>Title in Screen</h1>
  </MobileSizedView>
);

export default App;

โš“๏ธ Hooks

import { useScreenSize } from 'react-mobile-sized-view';

const SomeComponent: React.FC = () => {
  const { width: screenWidth } = useScreenSize();
  // Comes with SSR support

  return (
    <div
      style={{
        width: screenWidth,
        height: screenWidth,
        backgroundColor: 'coral',
      }}
    />
  );
};

About

๐Ÿ‘ Responsive Mobile-sized Wrapper for React - Easily prototype your mobile-sized web apps with desktop support

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0