react-device-layouts
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

React Device Layouts

This is a little package in which you can wrap your projects, proof of concepts and demos and display it in a certain device.

Note: The device is only for display purposes, not an actual device which can emulate a real world device.

Installation

npm i react-device-layouts

Usage

import { PhoneLayout } from 'react-device-layouts';

const PageLayout: React.FC = () => (
<AppContainer>
  <PhoneLayout>
    Your content goes here ...
  </PhoneLayout>
</AppContainer>
)

export default PageLayout

Props

The only props required are children: React.ReactNode

Example

image

Devices

  • iPhone SE

Future

  • More devices are planned in future which should include more mobile, tablet and desktop devices
  • Colour customisation for the device by passing props

/react-device-layouts/

    Package Sidebar

    Install

    npm i react-device-layouts

    Weekly Downloads

    3

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    156 kB

    Total Files

    66

    Last publish

    Collaborators

    • neilswart3