use-viewport-height
v0.1.2
Published
## Install
Downloads
7
Readme
use-viewport-height
Install
npm install use-viewport-height
// or
yarn add use-viewport-height
Usage
// 1. Import the hooks
import useViewportHeight from 'use-viewport-height'
const App = () => {
// 2. Add it to your app
useViewportHeight()
return (...)
}
and anywhere in your css file you can access the viewport height with: var(--tenka-viewport-height)
.my-div {
height: var(--tenka-viewport-height);
}