3.0.1 • Published 1 year ago

@jouwomgeving/ui-responsive v3.0.1

Weekly downloads
30
License
UNLICENSED
Repository
bitbucket
Last release
1 year 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

1 year ago

3.0.0

1 year ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.21

5 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.3-beta

9 years ago