Photographer portfolio
A dark photographer portfolio: point at a series name and its cover photo fills the whole section, crossfading from the last.
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./photographer-portfolio.css";
/**
* PhotographerPortfolio: a dark portfolio for a documentary photographer ("Inês Calado").
* Its signature: an index of series. Pointing at (or focusing, or tapping) a series
* name fills the whole section with its cover photo, crossfading from the last one.
*/
type Series = {
title: string;
place: string;
year: string;
frames: number;
image: string;
alt: string;
tone: string;
};
const SERIES: Series[] = [
{
title: "Salt",
place: "Aveiro, Portugal",
year: "2026",
frames: 34,
image: "/images/portfolio-photographer-series-01.jpg",
alt: "A salt worker raking a white salt pan at low sun, long shadow across the crust",
tone: "#a89f8c",
},
{
title: "Night shift",
place: "Porto bakeries",
year: "2025",
frames: 28,
image: "/images/portfolio-photographer-series-02.jpg",
alt: "A baker in a flour-dusted apron sliding loaves into an oven at night",
tone: "#6b4a2a",
},
{
title: "Last ferry",
place: "Lisbon to Cacilhas",
year: "2025",
frames: 41,
image: "/images/portfolio-photographer-series-03.jpg",
alt: "Passengers at the rail of a ferry at dusk with the city lights behind them",
tone: "#2f3a4f",
},
{
title: "Quiet rooms",
place: "Closed hotels, Algarve",
year: "2024",
frames: 19,
image: "/images/portfolio-photographer-series-04.jpg",
alt: "An empty off-season hotel room with a stripped bed and sea light through thin curtains",
tone: "#8c8a7a",
},
{
title: "Heat",
place: "Public pools, Seville",
year: "2024",
frames: 26,
image: "/images/portfolio-photographer-series-05.jpg",
alt: "A public swimming pool seen from above, swimmers and hard midday shadows",
tone: "#2b6f8a",
},
];
const CLIENTS = [
"The Guardian Weekend",
"Monocle",
"Expresso",
"Kinfolk",
"Público",
];
/** A full-bleed photo layer; shows its tone until the file exists. */
function Layer({ s, on }: { s: Series; on: boolean }) {
const img = useRef<HTMLImageElement>(null);
const [missing, setMissing] = useState(false);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return (
<div
className={`gu-photo__layer ${on ? "is-on" : ""}`}
style={{ "--tone": s.tone } as CSSProperties}
aria-hidden={!on}
>
{!missing && (
<img
ref={img}
src={s.image}
alt={on ? s.alt : ""}
onError={() => setMissing(true)}
/>
)}
</div>
);
}
export function PhotographerPortfolio() {
const [active, setActive] = useState(0);
const current = SERIES[active];
return (
<div className="gu-photo">
<nav className="gu-photo__nav" aria-label="Main">
<a href="#" className="gu-photo__name">
Inês Calado
</a>
<a href="#photo-about">About</a>
<a href="#photo-contact">Contact</a>
</nav>
<section className="gu-photo__index" aria-labelledby="gu-photo-index">
<div className="gu-photo__layers">
{SERIES.map((s, i) => (
<Layer key={s.title} s={s} on={i === active} />
))}
</div>
<h1 id="gu-photo-index" className="gu-photo__intro">
Documentary photographer in Lisbon. Long projects about work, water
and the hours most people sleep through.
</h1>
<ol className="gu-photo__list">
{SERIES.map((s, i) => (
<li key={s.title}>
<button
type="button"
aria-pressed={i === active}
onPointerEnter={(e) =>
e.pointerType === "mouse" && setActive(i)
}
onFocus={() => setActive(i)}
onClick={() => setActive(i)}
>
<span className="gu-photo__title">{s.title}</span>
<span className="gu-photo__meta">
{s.place}, {s.year}
</span>
</button>
</li>
))}
</ol>
<p className="gu-photo__caption" aria-live="polite">
<b>{current.title}</b> {current.frames} frames.{" "}
<a href="#">View the series</a>
</p>
</section>
<section
id="photo-about"
className="gu-photo__about"
aria-labelledby="gu-photo-about"
>
<h2 id="gu-photo-about">About</h2>
<div>
<p>
I spend months, sometimes years, with the same people and places.
Most of my work is shot on a 35mm rangefinder and printed by hand in
a darkroom in Marvila.
</p>
<p>
Available for editorial assignments, book projects and a small
number of brand commissions each year.
</p>
</div>
<div>
<h3>Published in</h3>
<ul>
{CLIENTS.map((c) => (
<li key={c}>{c}</li>
))}
</ul>
</div>
</section>
<section id="photo-contact" className="gu-photo__contact">
<p>For assignments and print sales</p>
<a href="mailto:studio@example.com">studio@example.com</a>
</section>
</div>
);
}
Paste this into ChatGPT, Claude, Cursor, v0, Lovable or Bolt. It describes the layout, motion, colors and accessibility and includes the code, so the AI can rebuild it in any framework.
# Build this UI piece: Photographer portfolio
You are a senior front-end engineer. Recreate the piece below in my project. If I don't say which framework I use, ask once, then build it in that framework (React, Vue, Svelte, Angular, Astro, plain HTML/CSS/JS or anything else). Keep the behavior, motion, colors, spacing and accessibility exactly as described. Keep the code clean and commented for beginners.
## What it is
A dark portfolio for a documentary photographer ("Inês Calado", Lisbon). Its signature: an index of photo series where pointing at a series name (or focusing it, or tapping it) fills the whole section with that series' cover photo, crossfading from the previous one. Sections: nav, the series index with a short intro and a caption line, an about block with the publications list, and a contact block with a huge email.
## Palette
Background #0e0e10, text #f3eee3, muted #aea89c, lines rgba(243,238,227,0.18), accent #ff5a1f (email hover only), focus ring #d7ff3a.
## Layout
- Root uses container queries (container-type: inline-size), side padding 5%.
- The nav sits on top of the index (the index pulls up 80px under it).
- Index: at least 680px tall. Behind it, five absolutely positioned photo layers plus two dark gradients (from the left, and from the bottom) so the text stays readable on any photo.
- Content: a short intro (max 30ch) at the top; at the bottom an ordered list of series names up to 7.5rem (weight 900, tracking -0.055em) at 35% opacity. The chosen one goes to full opacity, shifts 10px right and shows its place and year beside it. A caption line names the series, its frame count and a "View the series" link.
- About: three columns at ≥720px: a small heading, two paragraphs, and a "Published in" list.
- Contact: a small line, then the email up to 6.4rem.
## Images
Five series covers, 1800×1200 or larger, used full-bleed with object-fit: cover. Until a file exists, each layer shows a radial gradient in the series' tone.
## Motion
- Layers crossfade over 0.9s while the new photo settles from 1.04 scale (1.6s).
- The series title fades in and slides 10px; the place and year slide in from the left.
## Accessibility
- Each series name is a button with aria-pressed. It activates on mouse hover only (pointerType "mouse"), on keyboard focus and on click or tap, so touch never needs hover.
- Only the visible layer has alt text; hidden layers are aria-hidden. The caption is aria-live="polite", so the chosen series is announced.
- prefers-reduced-motion: photos swap with no fade or zoom and titles don't slide.
## Reference implementation
The original is written in React with one plain CSS file. Dependencies: none (plain React and CSS). Translate it faithfully; do not add new libraries unless my framework needs them.
### PhotographerPortfolio.tsx
```tsx
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./photographer-portfolio.css";
/**
* PhotographerPortfolio: a dark portfolio for a documentary photographer ("Inês Calado").
* Its signature: an index of series. Pointing at (or focusing, or tapping) a series
* name fills the whole section with its cover photo, crossfading from the last one.
*/
type Series = {
title: string;
place: string;
year: string;
frames: number;
image: string;
alt: string;
tone: string;
};
const SERIES: Series[] = [
{
title: "Salt",
place: "Aveiro, Portugal",
year: "2026",
frames: 34,
image: "/images/portfolio-photographer-series-01.jpg",
alt: "A salt worker raking a white salt pan at low sun, long shadow across the crust",
tone: "#a89f8c",
},
{
title: "Night shift",
place: "Porto bakeries",
year: "2025",
frames: 28,
image: "/images/portfolio-photographer-series-02.jpg",
alt: "A baker in a flour-dusted apron sliding loaves into an oven at night",
tone: "#6b4a2a",
},
{
title: "Last ferry",
place: "Lisbon to Cacilhas",
year: "2025",
frames: 41,
image: "/images/portfolio-photographer-series-03.jpg",
alt: "Passengers at the rail of a ferry at dusk with the city lights behind them",
tone: "#2f3a4f",
},
{
title: "Quiet rooms",
place: "Closed hotels, Algarve",
year: "2024",
frames: 19,
image: "/images/portfolio-photographer-series-04.jpg",
alt: "An empty off-season hotel room with a stripped bed and sea light through thin curtains",
tone: "#8c8a7a",
},
{
title: "Heat",
place: "Public pools, Seville",
year: "2024",
frames: 26,
image: "/images/portfolio-photographer-series-05.jpg",
alt: "A public swimming pool seen from above, swimmers and hard midday shadows",
tone: "#2b6f8a",
},
];
const CLIENTS = [
"The Guardian Weekend",
"Monocle",
"Expresso",
"Kinfolk",
"Público",
];
/** A full-bleed photo layer; shows its tone until the file exists. */
function Layer({ s, on }: { s: Series; on: boolean }) {
const img = useRef<HTMLImageElement>(null);
const [missing, setMissing] = useState(false);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return (
<div
className={`gu-photo__layer ${on ? "is-on" : ""}`}
style={{ "--tone": s.tone } as CSSProperties}
aria-hidden={!on}
>
{!missing && (
<img
ref={img}
src={s.image}
alt={on ? s.alt : ""}
onError={() => setMissing(true)}
/>
)}
</div>
);
}
export function PhotographerPortfolio() {
const [active, setActive] = useState(0);
const current = SERIES[active];
return (
<div className="gu-photo">
<nav className="gu-photo__nav" aria-label="Main">
<a href="#" className="gu-photo__name">
Inês Calado
</a>
<a href="#photo-about">About</a>
<a href="#photo-contact">Contact</a>
</nav>
<section className="gu-photo__index" aria-labelledby="gu-photo-index">
<div className="gu-photo__layers">
{SERIES.map((s, i) => (
<Layer key={s.title} s={s} on={i === active} />
))}
</div>
<h1 id="gu-photo-index" className="gu-photo__intro">
Documentary photographer in Lisbon. Long projects about work, water
and the hours most people sleep through.
</h1>
<ol className="gu-photo__list">
{SERIES.map((s, i) => (
<li key={s.title}>
<button
type="button"
aria-pressed={i === active}
onPointerEnter={(e) =>
e.pointerType === "mouse" && setActive(i)
}
onFocus={() => setActive(i)}
onClick={() => setActive(i)}
>
<span className="gu-photo__title">{s.title}</span>
<span className="gu-photo__meta">
{s.place}, {s.year}
</span>
</button>
</li>
))}
</ol>
<p className="gu-photo__caption" aria-live="polite">
<b>{current.title}</b> {current.frames} frames.{" "}
<a href="#">View the series</a>
</p>
</section>
<section
id="photo-about"
className="gu-photo__about"
aria-labelledby="gu-photo-about"
>
<h2 id="gu-photo-about">About</h2>
<div>
<p>
I spend months, sometimes years, with the same people and places.
Most of my work is shot on a 35mm rangefinder and printed by hand in
a darkroom in Marvila.
</p>
<p>
Available for editorial assignments, book projects and a small
number of brand commissions each year.
</p>
</div>
<div>
<h3>Published in</h3>
<ul>
{CLIENTS.map((c) => (
<li key={c}>{c}</li>
))}
</ul>
</div>
</section>
<section id="photo-contact" className="gu-photo__contact">
<p>For assignments and print sales</p>
<a href="mailto:studio@example.com">studio@example.com</a>
</section>
</div>
);
}
```
### photographer-portfolio.css
```css
/* PhotographerPortfolio: change these colors to match your brand. */
.gu-photo {
--bg: #0e0e10;
--text: #f3eee3;
--muted: #aea89c;
--line: rgb(243 238 227 / 0.18);
--accent: #ff5a1f;
--focus: #d7ff3a;
--ease: cubic-bezier(0.16, 1, 0.3, 1);
container-type: inline-size;
overflow: hidden;
background: var(--bg);
color: var(--text);
font-family: system-ui, sans-serif;
}
.gu-photo a {
color: inherit;
}
.gu-photo :focus-visible {
outline: 2px solid var(--focus);
outline-offset: 3px;
}
.gu-photo h1,
.gu-photo h2,
.gu-photo h3,
.gu-photo p {
margin: 0;
}
.gu-photo__nav {
position: relative;
z-index: 2;
display: flex;
align-items: center;
gap: 22px;
padding: 18px 5%;
font-weight: 600;
}
.gu-photo__nav a {
text-decoration: none;
}
.gu-photo__name {
margin-right: auto;
font-weight: 800;
letter-spacing: -0.02em;
}
/* Series index over a full-bleed photo */
.gu-photo__index {
position: relative;
display: grid;
align-content: space-between;
gap: 48px;
min-height: 680px;
margin-top: -80px;
padding: 120px 5% 32px;
isolation: isolate;
}
.gu-photo__layers {
position: absolute;
inset: 0;
z-index: -1;
}
.gu-photo__layers::after {
content: "";
position: absolute;
inset: 0;
background:
linear-gradient(to right, rgb(14 14 16 / 0.75), rgb(14 14 16 / 0.15) 70%),
linear-gradient(to top, rgb(14 14 16 / 0.85), transparent 40%);
}
.gu-photo__layer {
position: absolute;
inset: 0;
opacity: 0;
background: radial-gradient(
120% 90% at 70% 30%,
color-mix(in srgb, var(--tone) 80%, #fff),
var(--tone)
);
transform: scale(1.04);
transition:
opacity 0.9s var(--ease),
transform 1.6s var(--ease);
}
.gu-photo__layer.is-on {
opacity: 1;
transform: none;
}
.gu-photo__layer img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.gu-photo__intro {
max-width: 30ch;
font-size: clamp(1.1rem, 2.4cqi, 1.5rem);
font-weight: 500;
line-height: 1.35;
}
.gu-photo__list {
margin: 0;
padding: 0;
list-style: none;
}
.gu-photo__list button {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 4px 18px;
width: 100%;
padding: 4px 0;
border: 0;
background: none;
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
}
.gu-photo__title {
font-size: clamp(2.6rem, 9cqi, 7.5rem);
font-weight: 900;
line-height: 0.92;
letter-spacing: -0.055em;
opacity: 0.35;
transition:
opacity 0.35s,
transform 0.6s var(--ease);
}
.gu-photo__meta {
font-size: 0.9rem;
color: var(--muted);
opacity: 0;
transform: translateX(-8px);
transition:
opacity 0.35s,
transform 0.5s var(--ease);
}
.gu-photo__list button[aria-pressed="true"] .gu-photo__title {
opacity: 1;
transform: translateX(10px);
}
.gu-photo__list button[aria-pressed="true"] .gu-photo__meta {
opacity: 1;
transform: none;
}
.gu-photo__caption {
display: flex;
flex-wrap: wrap;
gap: 8px;
font-size: 0.95rem;
color: var(--muted);
}
.gu-photo__caption b {
color: var(--text);
}
.gu-photo__caption a {
font-weight: 700;
text-underline-offset: 4px;
}
/* About */
.gu-photo__about {
display: grid;
gap: 32px;
padding: 72px 5%;
}
@container (min-width: 720px) {
.gu-photo__about {
grid-template-columns: 1fr 2fr 1.2fr;
}
}
.gu-photo__about h2,
.gu-photo__about h3 {
font-size: 1rem;
font-weight: 700;
color: var(--muted);
}
.gu-photo__about > div > p {
max-width: 44ch;
font-size: 1.15rem;
line-height: 1.55;
}
.gu-photo__about > div > p + p {
margin-top: 16px;
color: var(--muted);
font-size: 1rem;
}
.gu-photo__about ul {
display: grid;
gap: 6px;
margin: 12px 0 0;
padding: 0;
list-style: none;
font-weight: 600;
}
.gu-photo__contact {
padding: 64px 5% 80px;
border-top: 1px solid var(--line);
}
.gu-photo__contact p {
color: var(--muted);
}
.gu-photo__contact a {
display: inline-block;
margin-top: 8px;
font-size: clamp(2rem, 8cqi, 6.4rem);
font-weight: 900;
letter-spacing: -0.055em;
text-decoration: none;
word-break: break-all;
transition: color 0.25s;
}
.gu-photo__contact a:hover {
color: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
.gu-photo__layer,
.gu-photo__title,
.gu-photo__meta,
.gu-photo__contact a {
transition: none;
}
.gu-photo__layer,
.gu-photo__list button[aria-pressed="true"] .gu-photo__title,
.gu-photo__meta {
transform: none;
}
}
```
You might also want
Next piece: Premium landing page prompt3D artist portfolio
Portfolios, advanced
Designer portfolio
Portfolios, advanced
Fashion designer portfolio with a lookbook loupe
Portfolios, advanced




