All Projects → zheeeng → react-device-frameset

zheeeng / react-device-frameset

Licence: MIT license
React device frameset component

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-device-frameset

Device Detector Js
A precise user agent parser and device detector written in TypeScript
Stars: ✭ 193 (+543.33%)
Mutual labels:  device, phone, tablet
MobyDroid
Android Device Manager with a Graphic User Interface (GUI) – Manage Android on Linux, Windows and MacOS.
Stars: ✭ 76 (+153.33%)
Mutual labels:  phone, tablet
Devicekit
DeviceKit is a value-type replacement of UIDevice.
Stars: ✭ 3,566 (+11786.67%)
Mutual labels:  device, simulator
Ngx Webcam
A simple Angular webcam component / pure & minimal, no flash-fallback
Stars: ✭ 148 (+393.33%)
Mutual labels:  phone, tablet
Simulator
📱 Navigate to your app folders quickly
Stars: ✭ 216 (+620%)
Mutual labels:  mac, simulator
Metalperformanceshadersproxy
A proxy for MetalPerformanceShaders which takes to a stub on a simulator and to the real implementation on iOS devices.
Stars: ✭ 41 (+36.67%)
Mutual labels:  device, simulator
mcloud
Mobile farm ecosystem for Android and iOS devices
Stars: ✭ 32 (+6.67%)
Mutual labels:  phone, tablet
platform device id
flutter plugin to get device id
Stars: ✭ 32 (+6.67%)
Mutual labels:  mac, device
isosim
ISO8583 Web Simulator - Built with Go!
Stars: ✭ 80 (+166.67%)
Mutual labels:  mac, simulator
react-device-frame
Preview website on a device
Stars: ✭ 24 (-20%)
Mutual labels:  device, phone
EdgeSim
Simulate the real environment, perform edge computing, edge caching experiments
Stars: ✭ 53 (+76.67%)
Mutual labels:  simulator
iOS-AirPrint-for-Mac
enable iOS Airprint Sharing on Mac OS
Stars: ✭ 24 (-20%)
Mutual labels:  mac
xbox360-controller-manager
Turn OFF your wireless xbox 360 controller on PC and see the battery status of the connected controllers.
Stars: ✭ 38 (+26.67%)
Mutual labels:  pc
dotfiles
my dotfiles
Stars: ✭ 12 (-60%)
Mutual labels:  mac
electron-vite-tailwind-starter
This Starter utilizes Electron, Vite and Tailwindcss in combination. It trys to adhare best practices.
Stars: ✭ 141 (+370%)
Mutual labels:  vite
Tricky68k
Motorola 68000 simulator for Mac OS X
Stars: ✭ 42 (+40%)
Mutual labels:  simulator
productivity-tools
No description or website provided.
Stars: ✭ 43 (+43.33%)
Mutual labels:  mac
bpmn-vue-activiti
基于Vue3.x + Vite + bpmn-js + element-plus + tsx 实现的Activiti流程设计器(Activiti process designer based on Vue3.x + Vite + BPMN-JS + Element-Plus + TSX implementation)
Stars: ✭ 345 (+1050%)
Mutual labels:  vite
seezoon-stack
一款基于当前最前沿的前端(Vue3 + Vite + Antdv)和后台(Spring boot)实现的低代码开发平台。
Stars: ✭ 227 (+656.67%)
Mutual labels:  vite
cleanup manager
Cleanup Manager helps you clean up folders on your Mac's hard drive.
Stars: ✭ 22 (-26.67%)
Mutual labels:  mac

React Device Frameset

NPM

publish workflow pages workflow npm version

This is yet another device frameset component for React.

Demo

Features

  • Powered by pure css device prototype showcase Marvel Devices.css

  • language Type Safe and under maintainable

  • Sample for reference

    • Device Selector frameset-screenshot

    • Device Emulator frameset-screenshot

Installation

yarn add react-device-frameset (or npm/pnpm)

Usage

Stylesheet importing

react-device-frameset supports conditional exports.

If the application bundler supports this feature and above node v12.11.0, you can import the stylesheet through the recommended path react-device-frameset/styles, it is largely supported in real developing environments, otherwise, you need to import it from react-device-frameset/dist/styles.

Basic Example

import { DeviceFrameset } from 'react-device-frameset'
import 'react-device-frameset/styles/marvel-devices.min.css'

export const App = () => {
    return (
        <DeviceFrameset device="iPhone 8" color="gold" landscape>
            <div>Hello world</div>
        </DeviceFrameset>
    )
}

Prop Signature

DeviceFramesetProps:

| { device: 'iPhone X', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'iPhone 8', color: 'black' | 'silver' | 'gold', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'iPhone 8 Plus', color: 'black' | 'silver' | 'gold', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'iPhone 5s', color: 'black' | 'silver' | 'gold', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'iPhone 5c', color: 'white' | 'red' | 'yellow' | 'green' | 'blue', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'iPhone 4s', color: 'black' | 'silver', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'Galaxy Note 8', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'Nexus 5', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'Lumia 920', color: 'black' | 'white' | 'yellow' | 'red' | 'blue', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'Samsung Galaxy S5', color: 'white' | 'black', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'HTC One', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'iPad Mini', color: 'black' | 'silver', landscape?: boolean, width?: number, height?: number, zoom?: number }
| { device: 'MacBook Pro', width?: number, height?: number, zoom?: number }

If you like the frameset selector?

type DeviceName = "iPhone X" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 5s" | "iPhone 5c" | "iPhone 4s" | "Galaxy Note 8" | "Nexus 5" | "Lumia 920" | "Samsung Galaxy S5" | "HTC One" | "iPad Mini" | "MacBook Pro"

type DeviceEmulatorProps = {
    banDevices?: DeviceName[]
    children: (props: DeviceFramesetProps) => React.ReactNode,
    value?: DeviceName,
    onChange?: (deviceName: DeviceName) => void, 
}
import { DeviceFrameset, DeviceSelector } from 'react-device-frameset'
import 'react-device-frameset/styles/marvel-devices.min.css'
import 'react-device-frameset/styles/device-selector.min.css'

export const App = () => {
    return (
        <DeviceSelector>
            {props => <DeviceFrameset {...props} />}
        </DeviceSelector>
    )
}

If you like the frameset emulator?

type DeviceName = "iPhone X" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 5s" | "iPhone 5c" | "iPhone 4s" | "Galaxy Note 8" | "Nexus 5" | "Lumia 920" | "Samsung Galaxy S5" | "HTC One" | "iPad Mini" | "MacBook Pro"

type DeviceEmulatorProps = {
    banDevices?: DeviceName[]
    children: (props: DeviceFramesetProps) => React.ReactNode,
    value?: DeviceFramesetProps,
    onChange?: (deviceConfig: DeviceFramesetProps) => void, 
}
import { DeviceFrameset, DeviceEmulator } from 'react-device-frameset'
import 'react-device-frameset/styles/marvel-devices.min.css'
import 'react-device-frameset/styles/device-emulator.min.css'

export const App = () => {
    return (
        <DeviceEmulator banDevices={["HTC One"]}>
            {props => <DeviceFrameset {...props} />}
        </DeviceEmulator>
    )
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].