Nav with a sliding indicator

The line under the nav slides to the section you are reading.

UniversalNew
Install
npx finepieces add section-nav
Or with the shadcn CLI ›
npx shadcn@latest add https://finepieces.net/r/section-nav.json

Scroll or click

import { SectionNav } from "@/components/fine-pieces/section-nav";

export default function Example() {
  return (
    <SectionNav
      brand="Klei"
      sections={[
        ["classes", "Classes", "keramiek-1"],
        ["shop", "Shop", "keramiek-2"],
        ["studio", "Studio", "handen-1"],
        ["contact", "Contact", "keramiek-3"],
      ].map(([id, label, k]) => ({
        id,
        label,
        content: (
          <>
            <h3 className="mb-4 font-display text-[52px] font-semibold leading-none tracking-[-.04em]">{label}</h3>
            <img src={img(k)} alt="" className="h-[280px] w-full rounded-md object-cover" />
          </>
        ),
      }))}
    />
  );
}