Device presets

Polypane comes with a list of pane presets in four different categories: Mobile, Tablet, Desktop and Other. To use a custom preset list, save a file called pane-sizes (no extension) in this directory:

  • Windows: %APPDATA%/Polypane/
  • macOS: ~/Library/Application Support/Polypane/
  • Linux: ~/.config/Polypane/

An example file can be found here: pane-sizes. In this file you can add, remove or rename categories and presets. You can add as many groups as you want (so you could split 'Mobile' into 'iOS' and 'Android' if you wanted to). Each group has a array of children, which have the following properties:

  • key (the name)
  • width
  • height
  • zoom (optional)
  • screenType (Can be either "desktop" or "mobile")
  • pixelRatio (The device pixel ratio)
  • userAgent (the prefered user agent)
  • viewport
    • portrait
      • width
      • height
    • landscape
      • width
      • height

The boolean supportsOrientation on a category determines if orientation should be taken into account for this category.

A future version of Polypane will provide a UI to manage device presets.

Is your question not answered?
Ask via Twitter, Slack or our contact form

Start a Polypane trial

Improve your web dev workflow

Start free trialView pricing