@ibnlanre/use-viewport-height
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

use-viewport-height

Calculates element's height required to fill the viewport.

Usage

import { useRef } from "react";

function Example() {
    const exampleRef = useRef();
    const height = useViewportHeight(exampleRef);
  
    return (<div ref={ref} style={{ height }} />)
}

Readme

Keywords

none

Package Sidebar

Install

npm i @ibnlanre/use-viewport-height

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

4.81 kB

Total Files

8

Last publish

Collaborators

  • ibnlanre