Skip to content
R

react-height

Component-wrapper to determine and report children elements height

by nkbtFree

#1076in UI Libraries
0In stores

Description

react-height is a component wrapper for React that measures the height of the elements inside it and reports that height to your code. You w…

Highlights

  • Reports the height of children to your code
  • Calls back when the height changes
  • Checks immediate children only
  • Custom measuring function
  • Hidden prop to render nothing after measuring

Ratings & Reviews

No ratings yet

Be the first to rate react-height.

People also visit

R

react-container-query

Container Query for React Component

UI Libraries
Launch
R

react-animate-height

Lightweight React component for animating height using CSS transitions

UI Libraries
Launch
R

react-collapse

Component-wrapper for collapse animation for elements with variable

UI Libraries
Launch
R

react-css-collapse

Component-wrapper for collapse animation with css for elements

UI Libraries
Launch
R

react-visibility-sensor

Sensor component for React that notifies you

UI Libraries
Launch
R

react-on-screen

A wrapper component to track if your react component is visible on screen

UI Libraries
Launch

react-height FAQ

What is react-height?

A React component wrapper that measures its children's height and reports it through a callback.

Does it track nested elements?

No. The README says it only checks immediate children, so changes deeper in the tree are not tracked.

How do I install it?

Install from npm or yarn, or use the script tag option for pages without a bundler, as described in the README.

Can I measure an element differently?

Yes. The getElementHeight prop takes your own function, and by default it reads clientHeight.

What license is it under?

MIT, as stated in the README.

What are the best react-height alternatives?

Popular alternatives to react-height include react-container-query, react-animate-height and react-collapse. See all react-height alternatives

Developer Stuff

Badges