Download Back To CSSScript.Com
A modern JavaScript library for intelligent header behavior. It hides when you explore, and returns when you need it.
Modern users demand screen real estate. Static headers waste valuable space on small devices. Peek.js solves this with elegant scroll intent detection.
Optimized with requestAnimationFrame for 60fps performance.
Less than 2kb gzipped. No jQuery or heavy dependencies.
Ignores accidental tiny scrolls to prevent jittery headers.
Maintains visibility when users are at the top of the page.
Uses classes for animations, giving you full control over the feel.
Experience the different modes and states that make Peek.js the best choice for your next project.
Scroll down to hide, up to show.
Requires intentional large movement.
Keep scrolling to see the header react...
Perfect for mobile views where every pixel of vertical space counts.
Integrates seamlessly with fixed, sticky, or absolute positioned headers.
Simple API, clear events, and full control over state classes.
Wait for it... scroll up now!
<header class="header-main">
<!-- Your beautiful navigation -->
</header>
/* Standard class-based logic */
.main-header--unpinned {
transform: translateY(-100%);
}
.main-header--pinned {
transform: translateY(0);
}
// One line is all you need
Peek('.header-main');