3.0.1 • Published 10 days ago

@jouwomgeving/ui-responsive v3.0.1

Weekly downloads
30
License
UNLICENSED
Repository
bitbucket
Last release
10 days ago

Responsive

$ npm install @jouwomgeving/ui-responsive

Viewport

Usage

import React from 'react';
import * as Responsive from '@jouwomgeving/ui-responsive';

function Layout() {
  return (
    <div>
      <Responsive.Container gt="medium">
        Shows above 768px
      </Responsive.Container>
      <Responsive.Container lte="medium">
        Shows under 768px
      </Responsive.Container>
    </div>
  )
}

export default Layout;

About

A component to hide or show certain react children, this will skip entire components from be rendered within in the React diffing algorithm.

The component has 6 different sizes to determine the viewport size;

  • tiny: Lower or equal to 480px.
  • small: Higher or equal to 481px;
  • small: Lower or equal to: 768px;
  • medium: Higher or equal to: 769px;
  • medium: Lower or equal to: 920px;
  • large: Higher or equal to: 921px;

Properties

PropsValuesDefaultRequired
childrenReactElementYes
ltesmall, medium, largeNo
lttiny, small, medium, largeNo
eqtiny, small, medium, largeNo
gttiny, small, medium, largeNo
gtetiny, small, mediumNo

Container

Will be added when needed

3.0.1

10 days ago

3.0.0

2 months ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.21

4 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.3-beta

8 years ago