A sticky navbar that morphs when it sticks, no JS
Ask your agent to implement this
Read the full writeup at https://seangeng.com/writing/sticky-navbar-that-morphs-on-scroll.md and implement it in my project.
It covers: A sticky navbar that morphs when it sticks, no JS. scroll-state container queries let the browser tell you when a sticky element is stuck, so you can restyle it on scroll with pure CSS. No scroll listeners, no animation library. Chromium-only for now.
Requirements:
- Follow the technique/approach exactly as described in the writeup.
- Adapt names, colors, and styling to my project's existing conventions.
- If it's a component, make it reusable with sensible props and TypeScript types.
- Keep it accessible: semantic HTML, keyboard support, and respect prefers-reduced-motion.
- When done, tell me which files you created or changed and how to use it.Paste into Claude Code, Codex, Cursor, or any agent. view raw .md