Nav with a sliding indicator
The line under the nav slides to the section you are reading.
UniversalNew
Install
npx finepieces add section-navOr with the shadcn CLI ›
npx shadcn@latest add https://finepieces.net/r/section-nav.jsonScroll or click
example.tsx
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" />
</>
),
}))}
/>
);
}