Course contentsShow
React
Lesson 738 of 2,39619. useRefPro lesson

Measuring Element Dimensions with getBoundingClientRect

Read ref.current.getBoundingClientRect() to get width, height, and position of a DOM element.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.