1.0.2 • Published 5 years ago

react-full-height-container v1.0.2

Weekly downloads
10
License
-
Repository
github
Last release
5 years ago

React full container height

A react component for creating a container which extends to the bottom of a page. Created for creating full height containers in complex layouts where using 'vh' or flex does not solve the problem.

Installation

via npm

$ npm install react-full-container-height

Include in project

import ReactFullHeight from 'react-full-container-height';

Usage

render(){
    return(
        <div className="container">
            <ReactFullHeight>
                // Include your components or code here..
            </ReactFullHeight>
        </div>
    )
}    

Options

ParamDescriptionTypeDefault value
marginBottomAdd a bottom margin to the container.number0
disabledWhether to disabled the full height caculation.booleanfalse
onInitA callback function returning the height when first calculated.function(height)-
onChangeA callback function executed every time the container height changes. Container height would change on page resize.function(height)-
dynamicHeightWhether to re-calculate the container height on every render.booleanfalse
delayDuration to wait before re-calculation of container height.milliseconds0

License

MIT