1.0.18 • Published 2 years ago

react-resize-tools v1.0.18

Weekly downloads
50
License
MIT
Repository
github
Last release
2 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

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.11

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago