Affix to pin it once its scroll container passes it, and set offsetTop to leave a gap above it.offsetBottom to hold the Accept button at the bottom edge of the terms, and use onChange to enable it once the reader scrolls to the end.offsetTop and offsetBottom together and the child pins to the bottom edge before you reach it and to the top edge once you scroll past it.target a function that returns the scrolling element when the Affix sits in a panel, drawer or modal instead of the page.onChange receives true when the child pins and false when it returns, here to make the Share button solid only while it is pinned.updatePosition() on the ref after the pinned child changes size, so the space it holds in the page grows or shrinks with it.