Skip to content

React component to create CSS only preview of the device.

Notifications You must be signed in to change notification settings

robertito13/react-device-preview

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-device-preview

React component to create CSS only preview of the device. The css is part of device.css

Install

$ npm i react-device-preview

Usage

import React, { Component } from 'react'
import ReactDevicePreview from 'react-device-preview'

class Something extends Component {
  render () {
    return (
      <div>
        <h1> iPhoneX </h1>

        <ReactDevicePreview
          device="iphonex"
          scale="0.6"
          >
          <h1> Hello World </h1>
        </ReactDevicePreview>

      </div>
    )
  }
}

Credits

https://github.com/bdryanovski/react-device-preview/

About

React component to create CSS only preview of the device.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 85.6%
  • JavaScript 14.4%