Skip to content

Using ref to calculate the width of the sticky and dynamically calculate the scrollIndex

Compare
Choose a tag to compare
@ShyamRaj ShyamRaj released this 03 Mar 22:33
  • Now takes ref to calculate the width.
  • Now takes ref and calculate the scrollIndex ~ at what scroll index to make it sticky, Also can pass the index as well.
  • Can pass css class to make sticky custom position as top, bottom, left and right side of the page.