Nautilus Portfolio
A selected-work section where the list and the pictures are one control. Point at a project in the numbered list, or Tab to it, and the Nautilus spiral beside it winds that project to the front; let the spiral run and the highlighted row follows it down the list.
components/nautilus-portfolio.tsx
"use client";
import * as React from "react";
import { Nautilus } from "@/components/ui/nautilus";
/* ── Content ─────────────────────────────────────────────────
* Everything you'd change to make the section yours: the copy
* and the projects. The list and the spiral are one control:
* point at a project (or focus it with Tab) and the spiral winds
* it to the front; let the spiral run and the list follows it.
* ─────────────────────────────────────────────────────────── */
/** Violet: the eyebrow, the current row's number and focus rings. */
const ACCENT = "#7c3aed";
const ACCENT_DARK = "#a78bfa";
const EYEBROW = "Selected work";
const HEADLINE = "Eight projects, 2023 to 2025.";
const SUBLINE = "Three houses, three interiors, a hotel and a library. Each one started with where the sun is at four in the afternoon.";
const ALL_WORK = { label: "All 31 projects", href: "#work" };
/** ms the pointer rests on a row before the spiral winds to it, so a sweep down the list does nothing. */
const INTENT = 120;
const photo = (id: string) =>
`https://images.unsplash.com/photo-${id}?auto=format&fit=crop&w=960&h=1200&q=80`;
const PROJECTS = [
{ src: photo("1727786467215-116f0dbb9696"), alt: "White stairs turning between vivid green walls", name: "Casa Verde", kind: "House", place: "Comporta", year: "2025", href: "#casa-verde" },
{ src: photo("1706541972715-41ea84cf1d1e"), alt: "An empty room where two arched lattice windows pour golden light across a patterned floor", name: "Lattice Room", kind: "Interior", place: "Seville", year: "2024", href: "#lattice-room" },
{ src: photo("1567016376408-0226e4d0c1ea"), alt: "A white arched opening onto a minimal white room with a dark grey sofa", name: "Arco Flat", kind: "Interior", place: "Lisbon", year: "2025", href: "#arco-flat" },
{ src: photo("1762755647813-017e128a4ba0"), alt: "A monstera in a terracotta pot against a textured orange wall", name: "Hotel Sal", kind: "Hotel", place: "Tavira", year: "2023", href: "#hotel-sal" },
{ src: photo("1672865362636-2a1c08284ede"), alt: "A curving white stair wall with a small plant on the steps", name: "Curve House", kind: "House", place: "Bergen", year: "2024", href: "#curve-house" },
{ src: photo("1754390755142-3b4b9ffbd1f3"), alt: "A raw concrete room with high steel windows, a deep red curtain and round poufs", name: "Foundry Loft", kind: "Interior", place: "Oslo", year: "2023", href: "#foundry-loft" },
{ src: photo("1576500762874-720db275b3f9"), alt: "A sunlit white wall with plants in terracotta pots above tiled steps", name: "Terraço House", kind: "House", place: "Porto", year: "2024", href: "#terraco-house" },
{ src: photo("1681157998340-6d848679b149"), alt: "A pointed sandstone arch with a tiled border opening onto a receding arcade", name: "Arcade Library", kind: "Library", place: "Marrakech", year: "2025", href: "#arcade-library" },
];
/* ── Section ─────────────────────────────────────────────── */
const pad = (n: number) => String(n).padStart(2, "0");
export function NautilusPortfolio() {
const [index, setIndex] = React.useState(0);
// While the pointer or focus is on the list, the spiral holds the project it shows.
const [hovering, setHovering] = React.useState(false);
const [focusing, setFocusing] = React.useState(false);
const holding = hovering || focusing;
const intent = React.useRef<number | undefined>(undefined);
React.useEffect(() => () => window.clearTimeout(intent.current), []);
const point = (i: number) => {
window.clearTimeout(intent.current);
intent.current = window.setTimeout(() => setIndex(i), INTENT);
};
return (
<section
style={{ "--accent": ACCENT, "--accent-dark": ACCENT_DARK } as React.CSSProperties}
className="overflow-x-clip bg-white text-zinc-950 dark:bg-zinc-950 dark:text-white"
>
<div className="mx-auto max-w-6xl px-6 py-20 sm:py-24">
<div className="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
<div className="max-w-xl">
<p className="text-[13px] font-medium text-(--accent) dark:text-(--accent-dark)">{EYEBROW}</p>
<h2 className="mt-3 text-balance text-[2rem] leading-[1.08] font-semibold tracking-[-0.035em] sm:text-[2.75rem]">{HEADLINE}</h2>
<p className="mt-4 max-w-md text-pretty text-base leading-relaxed text-zinc-600 dark:text-zinc-400">{SUBLINE}</p>
</div>
<a
href={ALL_WORK.href}
className="inline-flex shrink-0 items-center gap-1.5 self-start rounded-sm text-sm font-semibold underline decoration-zinc-950/20 underline-offset-4 transition-colors duration-150 hover:decoration-current focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-(--accent) sm:self-auto dark:decoration-white/25 dark:focus-visible:outline-(--accent-dark)"
>
{ALL_WORK.label}
</a>
</div>
<div className="mt-10 grid grid-cols-1 items-center gap-6 lg:mt-12 lg:grid-cols-[minmax(0,1fr)_minmax(0,24rem)] lg:gap-12">
<Nautilus
items={PROJECTS}
index={index}
onIndexChange={(i) => setIndex(i)}
side="right"
interval={3.4}
paused={holding}
label="Selected work"
className="-mx-6 h-[22rem] w-auto sm:h-[28rem] lg:mx-0 lg:h-[34rem] lg:w-full lg:[--nautilus-align:start]"
/>
<ol
className="border-t border-zinc-950/[0.08] dark:border-white/[0.1]"
onPointerEnter={(e) => e.pointerType === "mouse" && setHovering(true)}
onPointerLeave={() => {
window.clearTimeout(intent.current);
setHovering(false);
}}
onFocus={() => setFocusing(true)}
onBlur={(e) => !e.currentTarget.contains(e.relatedTarget as Node | null) && setFocusing(false)}
>
{PROJECTS.map((p, i) => {
const on = i === index;
return (
<li key={p.name} className="border-b border-zinc-950/[0.08] dark:border-white/[0.1]">
<a
href={p.href}
aria-current={on ? "true" : undefined}
onPointerEnter={(e) => e.pointerType === "mouse" && point(i)}
onFocus={() => setIndex(i)}
className="group grid grid-cols-[2.25rem_minmax(0,1fr)_auto] items-baseline gap-x-2 rounded-sm py-3.5 outline-offset-2 focus-visible:outline-2 focus-visible:outline-(--accent) dark:focus-visible:outline-(--accent-dark)"
>
<span
className={`font-mono text-xs tabular-nums transition-colors duration-200 ${on ? "text-(--accent) dark:text-(--accent-dark)" : "text-zinc-500 dark:text-zinc-400"}`}
>
{pad(i + 1)}
</span>
<span className="min-w-0">
<span
className={`block truncate text-base font-semibold tracking-[-0.015em] transition-colors duration-200 ${on ? "" : "text-zinc-500 group-hover:text-zinc-950 dark:text-zinc-400 dark:group-hover:text-white"}`}
>
{p.name}
</span>
<span className="block truncate text-[13px] text-zinc-500 dark:text-zinc-400">
{p.kind} · {p.place}
</span>
</span>
<span className="text-[13px] text-zinc-500 tabular-nums dark:text-zinc-400">{p.year}</span>
</a>
</li>
);
})}
</ol>
</div>
</div>
</section>
);
}
Installation
The CLI writes components/nautilus-portfolio.tsx, the components it's built with (components/ui/nautilus.tsx) and lib/utils.ts, and installs clsx and tailwind-merge. It needs the @keyframeui registry in components.json; add it once per project.
npx shadcn@latest add @keyframeui/nautilus-portfolioThen put it where the section goes. The copy, links and data sit in constants at the top of the file, so making it yours starts there.
app/page.tsx
import { NautilusPortfolio } from "@/components/nautilus-portfolio";
export default function Page() {
return <NautilusPortfolio />;
}
Built with
Each of these is a component on its own, with its own examples and props. The block installs them for you.