Skip to content

moshe-kabala/responsive-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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},

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published