Socket
Book a DemoInstallSign in
Socket

@jouwomgeving/ui-responsive

Package Overview
Dependencies
Maintainers
8
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jouwomgeving/ui-responsive

Dictator package JO ui responsive

Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
9
-97.8%
Maintainers
8
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 27 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts