1.0.18 • Published 3 years ago

react-resize-tools v1.0.18

Weekly downloads
50
License
MIT
Repository
github
Last release
3 years ago

react-resize-tools

Tools to help you with screen resizing.

Install

yarn add react-resize-tools
# or
npm i react-resize-tools --save

Change log

https://github.com/Achaak/react-resize-tools/blob/master/CHANGELOG.md

Hooks

useScreenSize

Return innerWidth, innerHeight, outerWidth and outerHeight when screen is resized.

Example:

const size = useScreenSize()

useScreenWidthType

Return xl, sm, md, lg, xl or xxl when screen is resized.

Example:

const widthType = useScreenWidthType()
// or
const widthType = useScreenWidthType({
  sm: 640,
  md: 768,
  lg: 1024,
  xl: 1280,
  xxl: 1400
})

Options :

OptionDefault
sm640
md768
lg1024
xl1280
xxl1400

useScroll

Return outerHeight when the page is scrolled.

Example:

const scroll = useScroll()
1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.11

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago