useHeadroom

Know when a fixed header should show or hide, based on the scroll direction.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

Scroll the page down to hide the label and up to show it.

APIs

useHeadroom

const useHeadroom = (options?: {
  fixedAt?: number
  onPin?: () => void
  onFix?: () => void
  onRelease?: () => void
}) => boolean
Edit this page on GitHub