Back to AIX Effects LibraryQA Verified · Synced
Scroll & Motion/<StickyNavbar />·Intermediate

Sticky Navbar Scroll Behavior

Works seamlessly inside contained showcase refs or window-wide fixed App Router layouts with static zero-CLS spacer parity.

Next.js 16+React 19TypeScriptTailwind CSSZero External Deps
SCROLL CONTAINER SPECIMEN

Scroll-aware header compressing cleanly from 76px to 56px.

01 · Threshold 18px: Applies translucent 72px frosted glass surface & bottom hairline.
02 · Threshold 165px: Compacts cleanly to 56px with elevated contrast CTA pill.
03 · Smart Hide 240px: Hides on downward scroll and reveals smoothly scrolling back up.

Scroll inside preview frame or toggle Smart Hide direction behavior.

Installation

Zero External Dependencies

Zero external packages required.

Usage

import { StickyNavbar } from '@/components/effects/library/scroll/StickyNavbar'

<StickyNavbar
  brandName="Atelier"
  links={[
    { label: 'Giới thiệu', href: '#intro' },
    { label: 'Nguyên lý', href: '#principles' },
    { label: 'Hoàn thiện', href: '#finish' },
  ]}
  ctaLabel="Bắt đầu"
  compactCtaLabel="Đầu trang ↑"
  smartHide
  showProgress
  zeroClsSpacer
/>

Props & API Reference

4 props
PropTypeDefaultDescriptionEffect
brandNamestring'Atelier'Brand wordmark label.Anchored on left slot.
smartHidebooleanfalseEnables direction-hysteresis hide on scroll down.Expands readable viewport height.
showProgressbooleantrueDisplays 2px progress line along top edge.Tracks linear page scroll ratio.
zeroClsSpacerbooleanfalseRenders static flow spacer preventing CLS.Guarantees zero document jump.

More in Scroll & Motion

View All 36 →
Scroll inner box below
0%
0%

01. Passive Listener Architecture: Measures container scrollTop ratio without layout polling.

02. Top Hairline Track: Maps progress cleanly across hardware scaleX transform.

03. SVG Dashoffset Geometry: Computes stroke circumference accurately from ring diameter.

04. Tabular Clarity: Prevents horizontal numeric wobble as percentages cross two digits.

05. End Checkpoint: Settles crisp at 100% upon reaching footer boundary.

Scroll Progress Indicator

Linear edge bar paired with tabular SVG stroke-dashoffset scroll completion indicator.

View Details
01 · PINNED SHELL
RENDER
Pinned Visual

Sticky Scroll Reveal

Two-column sticky reveal pairing scrollable documentation items with a stationary visual deck.

View Details
Scrub continuous 0 -> 1 timeline35%
02 · MORPH35%

Scroll-Driven Storytelling

Continuous 0..1 scrub timeline transforming scale, rotation, and border-radius smoothly.

View Details