1.2.0 • Published 1 year ago

react-iphone-layout v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React-iPhone-Layout

iphone_image

Installation

$ npm install react-iphone-layout --save-dev

$ yarn add react-iphone-layout --dev

Features

  • Web App Compatibility: Easily integrate iPhone layout into your web applications.
  • Web View Support: Optimize for iPhone on the web to provide a seamless web view.
  • Dynamic iPhone View Resizing: You can dynamically adjust the size of the iPhone view.
  • Real-Time View Switching: Check the iPhone view and laptop view in real-time through a control box, allowing for seamless testing and optimization of layouts across different devices.
  • Rotation iPhone: provide a screen rotation feature for the iPhone. (The internal content does not rotate)

Getting Started

import { IPhoneLayout } from "react-iphone-layout";
import "react-iphone-layout/dist/ReactIPhoneLayout.css"; // ✨

function App() {
  return (
    <IPhoneLayout>
      <p>this is iPhone layout!!!</p>
    </IPhoneLayout>
  );
}

Props

PropsTypeDefault
isStatusBarbooleantrue
position"top", "right", "bottom", "left""right"
mode"iPhone", "laptop""iPhone"
minSizenumber60
defaultSizenumber75
maxSizenumber100

Demo

License

MIT