PHPackages                             playwright-php/devices - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. playwright-php/devices

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

playwright-php/devices
======================

Playwright device descriptors in PHP (mobile &amp; desktop screens, user agents, viewports, scale factors, touch/mobile flags).

v1.0.0(6mo ago)1124MITPHPPHP ^8.2CI passing

Since Nov 8Pushed 6mo agoCompare

[ Source](https://github.com/playwright-php/devices)[ Packagist](https://packagist.org/packages/playwright-php/devices)[ GitHub Sponsors](https://github.com/smnandre)[ RSS](/packages/playwright-php-devices/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

[![Playwright PHP](https://github.com/playwright-php/.github/raw/main/profile/playwright-php.png)](https://github.com/playwright-php) [![PHP Version](https://camo.githubusercontent.com/e3c573a800a4c73db9b43cccf5963587c070cfa03efef919406eebf23ce49e6d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d3035393731423f6c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/e3c573a800a4c73db9b43cccf5963587c070cfa03efef919406eebf23ce49e6d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d3035393731423f6c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646) [![CI](https://camo.githubusercontent.com/bed963918dff71665394c2b4a2cdb55f0003a5c5d942a72f595b92975175bd83/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706c61797772696768742d7068702f646576696365732f43492e79616d6c3f6272616e63683d6d61696e266c6162656c3d546573747326636f6c6f723d314438443233266c6162656c436f6c6f723d303931363145266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/bed963918dff71665394c2b4a2cdb55f0003a5c5d942a72f595b92975175bd83/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706c61797772696768742d7068702f646576696365732f43492e79616d6c3f6272616e63683d6d61696e266c6162656c3d546573747326636f6c6f723d314438443233266c6162656c436f6c6f723d303931363145266c6f676f436f6c6f723d464646464646) [![Release](https://camo.githubusercontent.com/d5b9c620c696627c618b2bc1e29425b96ae2c8bef09e4854c83831263798a50c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706c61797772696768742d7068702f646576696365733f6c6162656c3d537461626c65266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/d5b9c620c696627c618b2bc1e29425b96ae2c8bef09e4854c83831263798a50c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706c61797772696768742d7068702f646576696365733f6c6162656c3d537461626c65266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646) [![License](https://camo.githubusercontent.com/01f5fd4a0e2331b82f9abdcc28ec9aef13e2b91fafd6a9c08e6921b1985cd5d8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706c61797772696768742d7068702f646576696365733f6c6162656c3d4c6963656e7365266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/01f5fd4a0e2331b82f9abdcc28ec9aef13e2b91fafd6a9c08e6921b1985cd5d8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706c61797772696768742d7068702f646576696365733f6c6162656c3d4c6963656e7365266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)

Playwright PHP: Device Descriptors
==================================

[](#playwright-php-device-descriptors)

This package provides the official [device descriptors](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json)from [Microsoft Playwright](https://github.com/microsoft/playwright) for use with [Playwright PHP](https://playwright-php.dev).

Installation
------------

[](#installation)

```
composer require playwright-php/devices
```

Usage
-----

[](#usage)

### Device Registry

[](#device-registry)

```
use Playwright\Device\DeviceRegistry;

$device = (new DeviceRegistry())->get('iPhone 15 Pro');
```

### Device descriptor

[](#device-descriptor)

The returned `$device` is an instance of `Playwright\Device\Device`, with the following methods:

```
$device->getName();               // 'iPhone 15 Pro'
$device->getUserAgent();          // 'Mozilla/5.0 (iPhone; CPU [...]'
$device->getViewport();           // ['width' => 393, 'height' => 659]
$device->getScreen();             // ['width' => 393, 'height' => 852]
$device->getDeviceScaleFactor();  // 3
$iphone->isMobile();              // true
$iphone->hasTouch();              // true
$iphone->getDefaultBrowserType(); // 'webkit'
```

### Browser emulation

[](#browser-emulation)

```
// Pass the device properties to a new browser context:
$browser->newContext([
    'userAgent' => $iphone->getUserAgent(),
    'viewport' => $iphone->getViewport(),
    'isMobile' => $iphone->isMobile(),
    'hasTouch' => $iphone->hasTouch(),
]);

// Or more simply:
$browser->newContext($iphone->toArray());
```

Catalog
-------

[](#catalog)

DeviceBrowserScreenScaleViewportLandscapeMobileTouchDesktop ChromeChromium1920 x 108011280 x 720NoNoDesktop Chrome HiDPIChromium1792 x 112021280 x 720NoNoDesktop EdgeChromium1920 x 108011280 x 720NoNoDesktop Edge HiDPIChromium1792 x 112021280 x 720NoNoDesktop FirefoxFirefox1920 x 108011280 x 720NoNoDesktop Firefox HiDPIFirefox1792 x 112021280 x 720NoNoDesktop SafariWebkit1792 x 112021280 x 720NoNoBlackberry PlayBookWebkitn/a1600 x 10241024 x 600YesYesBlackBerry Z30Webkitn/a2360 x 640640 x 360YesYesGalaxy A55Chromiumn/a2.25480 x 10401040 x 480YesYesExplore the full list of devices in [`docs/DEVICES.md`](docs/DEVICES.md).

License
-------

[](#license)

This package is released by the [Playwright PHP](https://playwright-php.dev)project under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance67

Regular maintenance activity

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8951d49b371d210280a58ce48969a07d1f49924810f8a1fab3a9343eb46fdc9?d=identicon)[simonandre](/maintainers/simonandre)

---

Top Contributors

[![smnandre](https://avatars.githubusercontent.com/u/1359581?v=4)](https://github.com/smnandre "smnandre (14 commits)")

---

Tags

descriptorsdesktop-devicesdeviceemulationmobile-devicesplaywrightplaywright-browsersplaywright-devicemobileuser agentdesktopbrowserstabletplaywrightemulationDevicesviewportdescriptors

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/playwright-php-devices/health.svg)

```
[![Health](https://phpackages.com/badges/playwright-php-devices/health.svg)](https://phpackages.com/packages/playwright-php-devices)
```

###  Alternatives

[jenssegers/agent

Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect

4.8k67.8M440](/packages/jenssegers-agent)[hisorange/browser-detect

Browser &amp; Mobile detection package for Laravel.

1.1k10.1M50](/packages/hisorange-browser-detect)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
