1.4.0 • Published 4 years ago

encore-device-detector v1.4.0

Weekly downloads
34
License
-
Repository
-
Last release
4 years ago

Encore device detector

Provide methods to identify device type and set specific CSS class.

Install

$ npm install encore-device-detector

Usage

1) Import DeviceDetector class 2) Create an instance and use it

Documentation

Library allows us to detect several device types: - mobile - tablet - desktop - ios It also allows us to detect some specific browsers: - ie - edge - safari And detect orientation: - portrait - landscape

Methods

setDeviceRelatedClassnames - Check device and browser and add specific CSS classes (available options: encore-mobile, encore-tablet, encore-desktop, encore-ie, encore-edge, encore-safari). Classes are configurable and can be changed using classNameConfiguration parameter isTablet - Check if device is tablet isMobile - Check if device is mobile isDesktop - Check if device is desktop isIE - Check if browser is IE isEdge - Check if browser is Edge isSafari - Check if browser is Safari isPortrait - Check if portrait orientation isLandscape - Check if landscape orientation

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago