๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข
Navigation

StickyTOC

Table of contents that sticks while scrolling and highlights the active section via IntersectionObserver.

Quick Preview

Scroll down through this page โ€” the TOC on the left tracks the active section in real time.

Introduction

Installation

Basic Usage

Variants

Accessibility

Installation

// Copy from
src/components/navigation/StickyTOC.tsx

Usage

import StickyTOC from '@/components/navigation/StickyTOC'
const tocItems = [
{ id: 'intro', label: 'Introduction' },
{ id: 'usage', label: 'Basic Usage' },
{ id: 'props', label: 'Props' },
]
// Each section must have a matching id and scroll-mt to clear the navbar
export default function DocsPage() {
return (
<div className="flex gap-10">
<StickyTOC items={tocItems} title="On this page" />
<main>
<section id="intro" className="scroll-mt-24">...</section>
<section id="usage" className="scroll-mt-24">...</section>
<section id="props" className="scroll-mt-24">...</section>
</main>
</div>
)
}

Prompt Preview

Copy a prompt that recreates this UI

Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.

Copy-ready AI prompt

Starts from the current visual reference and project constraints.

Tweak only product-specific copy or data after the first generation pass.

Props

PropTypeDefaultDescription
items*TocItem[]-Array of {id, label, level?}
titlestring'On This Page'Heading above the list