enquirebreakpoints

1.0.2 • Public • Published

enquireBreakPoints

Utility to add classes to body based on viewport. Built on top of Enquire.js

Adds a class to document body at user defined breakpoints. Also provides a helper object with boolean values for all user defined breakpoints.

Browser Compatibility

  • IE9+
  • Edge *
  • Firefox 29+
  • Safari 8+
  • Chrome 33+
  • Opera 23+

Install

npm install --save enquirebreakpoints

Usage

import { enquireBreakPoints, watchBreakpoint } from 'enquireBreakPoints';
 
[480, 599, 767, 991, 1199].forEach(watchBreakpoint);
console.log(enquireBreakPoints);
// Output
// {is_480: true, is_599: true, is_767: true, is_991: true, is_1199: true}

License

MIT

Package Sidebar

Install

npm i enquirebreakpoints

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.25 kB

Total Files

4

Last publish

Collaborators

  • virajsoni06