1.0.0-alpha.8 • Published 5 years ago
responsive-query v1.0.0-alpha.8
responsive-query
Query on the current mode of the screen for js
- Lightweight
- Zero dependencies
- Support typescript
- Tested
Installation
npm i responsive-query
Easy to use
For example
import resQuery from "responsive-query"
if (resQuery.is.Desktop) { // return true only if the screen between 1200-1800
// do something
}
if (resQuery.Desktop.andBigger) { // return true only if the screen bigger than 1200
// do something
}
if (resQuery.Desktop.andSmaller) { // return true only if the screen smaller than 1800
// do something
}
Screen types
Screen types divided to
- BigDesktop: {from: 1800},
- Desktop: {from:1200, to: 1800 },
- TabletLandscape: {from:940 ,to: 1200},
- TabletPortrait: {from:640 ,to: 940},
- Smartphone: { to: 640},
1.0.0-alpha.8
5 years ago
1.0.0-alpha.7
5 years ago
1.0.0-alpha.6
5 years ago
1.0.0-alpha.5
5 years ago
1.0.0-alpha.4
5 years ago
1.0.0-alpha.3
5 years ago
1.0.0-alpha.2
5 years ago
1.0.0-alpha.1
5 years ago
1.0.0-alpha.0
5 years ago