HideOnScroll

Hides its wrapper on a downward scroll past a threshold and shows it again on any upward scroll.

Installation

pnpm dlx shadcn@latest add @chelone/hide-on-scroll

Hides its wrapper on a downward scroll past a threshold and shows it again on any upward scroll.

Props

PropTypeDefaultDescription
thresholdnumber—Scroll offset in pixels a downward scroll must pass before hiding.