Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-css-devices-supportchef

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-css-devices-supportchef

React component for CSS Devices in your project

  • 0.1.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

react-css-devices

(fork available as react-css-devices-supportchef)

Key differences of fork

  • Exports availableDevices
  • Has latest Marvel devices, (iPhone X and Note 8)

React component for CSS Devices in your project. (NOTE: This project is still work in progress. Marvel Devices are however ready to use. More devices and customization coming soon.)

macbook

Installation

npm install --save react-css-devices

Important Note : You need to have a css-loader installed. for example with webpack

Props

PropsCoolProp Values
deviceName (String)Name of the deviceiphone6, iphone6plus, iphone5s, iphone5c, ipad, iphone4s, nexus5, s5, htc-one, macbook
color (String)Color ( only supported by iphone5c for now )white, black, red, yellow, green, blue
orientation (String)Landscape or portraitlandscape, portrait
transform (Integer)Scale the device to your size ( Size chart below )default is 1

Size Chart

Device1x Portrait Size ( Device )1x Portrait Size ( Screen )
iphone6423x887375x667
iphone6plus466x960414x736
iphone5s364x778320x568
iphone5c364x778320x568
ipad626x948576x768
iphone4s374x738320x480
nexus5350x668320x568
s5356x688320x568
htc-one370x740320x568
macbook1048x720960x600

Examples

To create a black iphone in landscape you do

import { MarvelDevices } from 'react-css-devices'

<MarvelDevices deviceName={"iphone6"}
               color={"black"}
               orientation={"landscape"}
               transform={0.5}>
    
    {/*Paste your content here*/}
    <img src={"http://via.placeholder.com/667x375"}/> 
     
</MarvelDevices>

Credits

Marvel devices

Author

Any suggestions / improvements / critics are welcome. I'm available on @aswinckr

Keywords

FAQs

Package last updated on 08 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc