Atelier UI

Search components…

Search components…

Sticky Subnav

A sticky secondary navigation that highlights the current section on scroll, with smooth scrolling and mobile overflow fades.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

StickySubnavProps

Also accepts all props of Omit<React.ComponentProps<"nav">, "children">

PropTypeDefaultDescription
sections* requiredSubnavSection[]——
scrollContainerReact.RefObject<HTMLElement | null>—The scrolling element that contains the sections. Omit to use the page itself
actionsReact.ReactNode—Optional content pinned to the right edge, e.g. a call-to-action

Install

$ npx shadcn@latest add https://chromotion.dev/r/sticky-subnav.json

More like this