react-brk

1.0.1 • Public • Published

React Breakpoints (react-brk)

Travis npm package Coveralls

About

Easy, ready to use, well defined, react media queries taken from react-responsive and packed here.

This package lacks originality and does not introduce anything new.

It's just a wrapper of react-responsive made for convinience, just plug and play.

All the credit goes to the folks of react-responsive.

Installation

npm install react-brk --save

yarn add react-brk

Breakpoints

Desktop minWidth: 992

Tablet minWidth: 768, maxWidth: 991

Mobile maxWidth: 767

Default minWidth: 768

Example

import { Desktop, Tablet, Mobile, Default } from 'react-brk'

const app = () => (
  <div>
    <Desktop>
      <div>Desktop (width > 992px)</div>
    </Desktop>
    <Tablet>
      <div>Tablet (768 < width < 991)</div>
    </Tablet>
    <Mobile>
      <div>Mobile (width < 767)</div>
    </Mobile>
    <Default>
      <div>Default (width > 768)</div>
    </Default>
  </div>
)

Package Sidebar

Install

npm i react-brk

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.16 kB

Total Files

4

Last publish

Collaborators

  • woile