Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jifalops/screen-env

Differentiate screen types by size, touch ability, and more.
https://github.com/jifalops/screen-env

Last synced: about 2 months ago
JSON representation

Differentiate screen types by size, touch ability, and more.

Awesome Lists containing this project

README

        

[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/jifalopsscreen-env)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/jifalopsscreen-env.svg)](https://vaadin.com/directory/component/jifalopsscreen-env)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/jifalops/screen-env)

# screen-env
Differentiate screen types by size, touch ability, and more.

## Installation
```
bower install --save screen-env
```

## Usage
* Bind to the `screen-env` properties you are interested in.

## Demo

```html

Main abilities
narrowWidth[[narrowWidth]]
Mobile/tablet+, (600px or less)
isTouch[[isTouch]]
false: no browser support

null: browser support

true: touchstart has occurred
uaIsDesktop[[uaIsDesktop]]
User requested desktop site
isMobile[[isMobile]]
Material design + UA/media check

```

Full demo:
[webcomponents.org](https://www.webcomponents.org/element/jifalops/screen-env/demo/demo/index.html)
| [github](https://jifalops.github.io/screen-env/components/screen-env/demo/).

API: [webcomponents.org](https://www.webcomponents.org/element/jifalops/screen-env/screen-env)
| [github](https://jifalops.github.io/screen-env).

## Contributing

1. Fork it on Github.
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request

## License

[MIT](https://opensource.org/licenses/MIT)