An open API service indexing awesome lists of open source software.

https://github.com/junhoyeo/react-mobile-sized-view

🍑 Responsive Mobile-sized Wrapper for React - Easily prototype your mobile-sized web apps with desktop support
https://github.com/junhoyeo/react-mobile-sized-view

component mobile mobile-view prototype react

Last synced: 24 days ago
JSON representation

🍑 Responsive Mobile-sized Wrapper for React - Easily prototype your mobile-sized web apps with desktop support

Awesome Lists containing this project

README

          

# react-mobile-sized-view
React Mobile Sized View - 🍑 Responsive Mobile-sized Wrapper for React | Product Hunt

- Featured on [reactjsexample.com](https://reactjsexample.com/a-neumorphism-style-mobile-sized-view-component-for-react/)(thx editor 🙇)

![demo image](https://github.com/junhoyeo/react-mobile-sized-view/raw/main/docs/demo.gif)

> 🍑 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

- [junhoyeo/buymetesla](https://github.com/junhoyeo/buymetesla)
- [junhoyeo/NIKE-THE-DRAW-Calendar](https://github.com/junhoyeo/NIKE-THE-DRAW-Calendar)
- [stevejkang/vue-mobile-sized-view](https://github.com/stevejkang/vue-mobile-sized-view)

> **[🚀 Add your apps here too!](https://github.com/junhoyeo/react-mobile-sized-view/issues/new)**

## 📦 Usage

```bash
yarn add styled-components && yarn add -D @types/styled-components
yarn add react-mobile-sized-view
```

```tsx
import React from 'react';
import MobileSizedView from 'react-mobile-sized-view';

const App: React.FC = () => (

Title in Screen



);

export default App;
```

## ⚓️ Hooks

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

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

return (


);
};
```

- [useScreenSize](https://github.com/junhoyeo/react-mobile-sized-view/blob/main/src/hooks/useScreenSize.ts): Use this to get the size of the `MobileSizedView`
- [useWindowSize](https://github.com/junhoyeo/react-mobile-sized-view/blob/main/src/hooks/useWindowSize.ts)