Tailwind UI Pattern Registry for humans and agents

scroll theme adaptive navigation color-transition section scroll theme adaptive sticky color-shift section-aware sticky nav that changes color on scroll section-aware theme switching scroll-driven design with adaptive navigation

Theme Section Base

Fetch pattern JSON: curl https://webspire.de/patterns/theme-section/base.json

Details

Family
theme-section
Tier
base
Kind
section
Responsive Dark Mode Copy & Paste Requires JS
Stable Published
scrollthemeadaptivenavigationcolor-transitionsection

Slots

Name Required Description
nav-logo No Brand name or logo in the sticky navigation bar.
nav-links No Navigation links that inherit the adaptive color.
sections Yes Two or more content sections, each with data-section-bg and data-section-text attributes.

Props

Name Type Default Description
threshold number 0.5 IntersectionObserver threshold — how much of a section must be visible before the nav adapts (0–1).

A scroll-driven layout pattern where a sticky header adapts to the section currently in view. Use data-section-bg and data-section-text on each <section> to declare its target nav colors — the IntersectionObserver picks up the active section and transitions the nav smoothly.

Replace the three demo sections with your actual content. The inner <div> containers and their inline styles are just scaffolding — adapt to your design tokens as needed.