{"id":13417534,"url":"https://github.com/zheeeng/react-device-frameset","last_synced_at":"2025-08-11T15:18:42.454Z","repository":{"id":42054517,"uuid":"371884396","full_name":"zheeeng/react-device-frameset","owner":"zheeeng","description":"React device frameset component","archived":false,"fork":false,"pushed_at":"2024-04-04T01:37:55.000Z","size":1089,"stargazers_count":65,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-31T22:38:54.423Z","etag":null,"topics":["android","device","emulator","frameset","ios","mac","pc","phone","react","simulator","tablet","type","vite"],"latest_commit_sha":null,"homepage":"https://react-device-frameset.zheeeng.me","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zheeeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-29T05:02:22.000Z","updated_at":"2024-07-17T04:00:43.000Z","dependencies_parsed_at":"2023-12-19T10:07:02.388Z","dependency_job_id":"44ecd213-f236-4051-afc9-59247657ae17","html_url":"https://github.com/zheeeng/react-device-frameset","commit_stats":{"total_commits":80,"total_committers":4,"mean_commits":20.0,"dds":"0.21250000000000002","last_synced_commit":"267d15d0fceeaca0b49bd7b67091a3ff8c6ef46a"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zheeeng%2Freact-device-frameset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zheeeng%2Freact-device-frameset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zheeeng%2Freact-device-frameset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zheeeng%2Freact-device-frameset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zheeeng","download_url":"https://codeload.github.com/zheeeng/react-device-frameset/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922247,"owners_count":20855345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","device","emulator","frameset","ios","mac","pc","phone","react","simulator","tablet","type","vite"],"created_at":"2024-07-30T22:00:39.601Z","updated_at":"2025-04-03T02:09:31.488Z","avatar_url":"https://github.com/zheeeng.png","language":"TypeScript","readme":"# React Device Frameset\n\n[![NPM](https://nodei.co/npm/react-device-frameset.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/react-device-frameset/)\n\n![publish workflow](https://github.com/zheeeng/react-device-frameset/actions/workflows/publish.yml/badge.svg)\n![pages workflow](https://github.com/zheeeng/react-device-frameset/actions/workflows/pages.yml/badge.svg)\n[![npm version](https://img.shields.io/npm/v/react-device-frameset.svg)](https://www.npmjs.com/package/react-device-frameset)\n\nThis is yet another device frameset component for React.\n\n## [Demo](https://react-device-frameset.zheeeng.me)\n\n## Features\n\n* Powered by pure css device prototype showcase [Marvel Devices.css](http://marvelapp.github.io/devices.css/)\n* [![language](https://img.shields.io/badge/%3C%2F%3E-TypeScript-blue.svg)](http://typescriptlang.org/) Type Safe and under maintainable\n* Sample for reference\n\n  * Device Selector\n![frameset-screenshot](https://user-images.githubusercontent.com/1303154/120062053-a58a6200-c092-11eb-9fec-fa0dd3609645.png)\n\n  * Device Emulator\n![frameset-screenshot](https://user-images.githubusercontent.com/1303154/132490604-f6d05da8-835d-437f-9b10-5ffec76e661f.png)\n\n## Installation\n\n```bash\nyarn add react-device-frameset (or npm/pnpm)\n```\n\n## Usage\n\n### Stylesheet importing\n\n`react-device-frameset` supports [conditional exports](https://nodejs.org/api/packages.html#conditional-exports).\n\nIf 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`.\n\n### Basic Example\n\n```tsx\nimport { DeviceFrameset } from 'react-device-frameset'\nimport 'react-device-frameset/styles/marvel-devices.min.css'\n\nexport const App = () =\u003e {\n    return (\n        \u003cDeviceFrameset device=\"iPhone 8\" color=\"gold\" landscape\u003e\n            \u003cdiv\u003eHello world\u003c/div\u003e\n        \u003c/DeviceFrameset\u003e\n    )\n}\n```\n\n### Props Signature\n\nDeviceFramesetProps:\n\n```ts (signature)\n| { device: 'iPhone X', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'iPhone 8', color: 'black' | 'silver' | 'gold', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'iPhone 8 Plus', color: 'black' | 'silver' | 'gold', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'iPhone 5s', color: 'black' | 'silver' | 'gold', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'iPhone 5c', color: 'white' | 'red' | 'yellow' | 'green' | 'blue', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'iPhone 4s', color: 'black' | 'silver', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'Galaxy Note 8', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'Nexus 5', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'Lumia 920', color: 'black' | 'white' | 'yellow' | 'red' | 'blue', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'Samsung Galaxy S5', color: 'white' | 'black', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'HTC One', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'iPad Mini', color: 'black' | 'silver', landscape?: boolean, width?: number, height?: number, zoom?: number }\n| { device: 'MacBook Pro', width?: number, height?: number, zoom?: number }\n```\n\n## If you like the frameset selector?\n\n```ts (signature)\ntype 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\"\n\ntype DeviceEmulatorProps = {\n    banDevices?: DeviceName[]\n    children: (props: DeviceFramesetProps) =\u003e React.ReactNode,\n    value?: DeviceName,\n    onChange?: (deviceName: DeviceName) =\u003e void, \n}\n```\n\n```tsx\nimport { DeviceFrameset, DeviceSelector } from 'react-device-frameset'\nimport 'react-device-frameset/styles/marvel-devices.min.css'\nimport 'react-device-frameset/styles/device-selector.min.css'\n\nexport const App = () =\u003e {\n    return (\n        \u003cDeviceSelector\u003e\n            {props =\u003e \u003cDeviceFrameset {...props} /\u003e}\n        \u003c/DeviceSelector\u003e\n    )\n}\n```\n\n## If you like the frameset emulator?\n\n```ts (signature)\ntype 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\"\n\ntype DeviceEmulatorProps = {\n    banDevices?: DeviceName[]\n    children: (props: DeviceFramesetProps) =\u003e React.ReactNode,\n    value?: DeviceFramesetProps,\n    onChange?: (deviceConfig: DeviceFramesetProps) =\u003e void, \n}\n```\n\n```tsx\nimport { DeviceFrameset, DeviceEmulator } from 'react-device-frameset'\nimport 'react-device-frameset/styles/marvel-devices.min.css'\nimport 'react-device-frameset/styles/device-emulator.min.css'\n\nexport const App = () =\u003e {\n    return (\n        \u003cDeviceEmulator banDevices={[\"HTC One\"]}\u003e\n            {props =\u003e \u003cDeviceFrameset {...props} /\u003e}\n        \u003c/DeviceEmulator\u003e\n    )\n}\n```\n","funding_links":[],"categories":["Projects Using Vite.js","Dev Tools"],"sub_categories":["Apps/Websites","Miscellaneous"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzheeeng%2Freact-device-frameset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzheeeng%2Freact-device-frameset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzheeeng%2Freact-device-frameset/lists"}