Skip to content

Commit 68a711f

Browse files
p-iknowclaude
andcommitted
feat: add sticky header tab navigation example
Sticky tab bar pattern using IntersectionObserver sentinel for sticky state detection, scrollTo with scrollend event for tab-section navigation, and reverse traversal for scroll-to-tab sync. Includes visual concept diagrams and README documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cb5f807 commit 68a711f

6 files changed

Lines changed: 937 additions & 0 deletions

File tree

apps/lab/src/routes/__root.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ function RootComponent() {
5555
>
5656
Pagination
5757
</Link>
58+
<Link
59+
to="/sticky-header"
60+
className="text-sm text-gray-600 hover:text-gray-900 [&.active]:font-semibold [&.active]:text-blue-600"
61+
>
62+
Sticky Header
63+
</Link>
5864
</div>
5965
</nav>
6066
<main className="mx-auto max-w-4xl px-4 py-8">

apps/lab/src/routes/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ const concepts = [
2626
'서버 인터페이스(Offset / Cursor / 월+Offset)에 따른 페이지네이션 구현 패턴과 keepPreviousData를 활용한 전환 UX.',
2727
source: '월 선택 + 페이지네이션 패턴: 월 단위 목록 조회를 위한 이중 네비게이션',
2828
},
29+
{
30+
to: '/sticky-header' as const,
31+
title: 'Sticky Header',
32+
description:
33+
'중간에 위치한 컴포넌트가 스크롤되어 화면 상단에 닿으면 고정되는 패턴. IntersectionObserver sentinel로 sticky 상태를 감지하여 시각적 피드백을 제공합니다.',
34+
source: 'Sticky Header 패턴: IntersectionObserver + CSS sticky',
35+
},
2936
]
3037

3138
function Home() {

0 commit comments

Comments
 (0)