use-screen-width
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

use-screen-size

This helps you get the current screen width value

NPM JavaScript Style Guide

Install

npm install --save use-screen-width
yarn add use-screen-width

Example

This shows a quick example of displaying your screen width, screen height and current screen mode

import React from 'react'

import { useScreenWidth } from 'use-screen-width'

const App = () => {
  const { screenWidth } = useScreenWidth()

  return (
    <>
      <h1>Screen width: {screenWidth}px</h1>
    </>
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i use-screen-width

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

3.03 kB

Total Files

7

Last publish

Collaborators

  • coder054