npm

ergonomic-viewport

1.0.2 • Public • Published

ergonomic-viewport

NPM version build status Test coverage Downloads js-standard-style

Get the current ergonomic viewport.

lwb-ergonomic viewports

Installation

$ npm install ergonomic-viewport

Usage

const viewport = require('ergonomic-viewport')
 
viewport()
// => 'lap'

API

viewport([number])

Get the ergonomic viewport. Response is one of wrist, palm, lap, desk, and wall. Suggestions for a mall breakpoint value are welcome.

Why?

Defining sizes in terms of known devices causes issues in the future (phablet size, anyone?) so instead it's safer to base names on human ergonomics.

See Also

License

MIT

Package Sidebar

Install

npm i ergonomic-viewport

Weekly Downloads

8

Version

1.0.2

License

MIT

Last publish

Collaborators

  • yoshuawuyts