Skip to content

A package that analyze and gives information about browser width such as screen type (XS, SM, MD, LG)

License

Notifications You must be signed in to change notification settings

mbrn/horizontal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

horizontal

Build Status npm package NPM Downloads Average time to resolve an issue Follow on Twitter

A package that analyze and gives information about browser width such as screen type (XS, SM, MD, LG)

Installation

To install horizontal with npm:

npm install horizontal --save

To install horizontal with yarn:

yarn add horizontal

Usage

import { Horizontal, ScreenType } from 'horizontal'

// Set defaults
// Horizontal.setDefaults(600, 900, 1100); xs < 600, sm < 900, md < 1100

if(Horizontal.getType() == ScreenType.MD) {
  // screen is medium size
}

const data = Horizontal.getData();
console.log(data.width); // Available width of window

Contributing

We'd love to have your helping hand on horizontal! See CONTRIBUTING.md for more information on what we're looking for and how to get started.

License

This project is licensed under the terms of the MIT license.

About

A package that analyze and gives information about browser width such as screen type (XS, SM, MD, LG)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published