Architect portfolio
A quiet architecture portfolio with a sortable project table; choosing a project shows its photo and draws its floor plan line by line.
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./architect-portfolio.css";
/**
* ArchitectPortfolio: a quiet portfolio for an architecture practice ("Varga Lenz").
* Its signature: a sortable project index. Choosing a project shows its photo and
* draws its floor plan line by line (SVG drawn in code).
*/
type Project = {
id: string;
name: string;
place: string;
type: string;
year: number;
area: number;
image: string;
alt: string;
tone: string;
/** Floor plan walls as SVG path data on a 200×140 grid */
plan: string;
note: string;
};
const PROJECTS: Project[] = [
{
id: "slope",
name: "House on a slope",
place: "Ticino, Switzerland",
type: "House",
year: 2026,
area: 240,
image: "/images/portfolio-architect-project-01.jpg",
alt: "A board-marked concrete house stepping down a green hillside with a long window band",
tone: "#8c8a83",
plan: "M10 20H190V120H10Z M10 70H90 M90 20V120 M140 20V70 M140 70H190 M40 120V100 M150 120V96",
note: "Three split levels follow the hill, so every room opens to the lake at a different height.",
},
{
id: "library",
name: "Neighbourhood library",
place: "Ljubljana, Slovenia",
type: "Public",
year: 2025,
area: 1850,
image: "/images/portfolio-architect-project-02.jpg",
alt: "A library reading room with tall timber fins and daylight from a sawtooth roof",
tone: "#a08b6d",
plan: "M10 10H190V130H10Z M10 50H120 M120 10V130 M60 50V130 M120 90H190 M150 10V50",
note: "A sawtooth roof brings north light into every reading table; the children's room opens to a garden.",
},
{
id: "cellar",
name: "Winery and cellar",
place: "Tokaj, Hungary",
type: "Work",
year: 2024,
area: 960,
image: "/images/portfolio-architect-project-03.jpg",
alt: "A long rammed-earth wall of a winery set into vineyard terraces at dusk",
tone: "#7a5a46",
plan: "M10 40H190V100H10Z M60 40V100 M130 40V100 M10 70H60 M130 70H190 M90 100V130H100V100",
note: "Rammed earth from the site keeps the cellar at 12 °C all year without mechanical cooling.",
},
{
id: "courtyard",
name: "Courtyard housing",
place: "Vienna, Austria",
type: "Housing",
year: 2023,
area: 4200,
image: "/images/portfolio-architect-project-04.jpg",
alt: "A planted inner courtyard surrounded by four storeys of brick housing with deep balconies",
tone: "#9a6b4f",
plan: "M10 10H190V130H10Z M50 50H150V90H50Z M10 50H50 M150 50H190 M100 10V50 M100 90V130",
note: "Thirty-two flats around one shared courtyard; every flat has windows on two sides.",
},
];
type Key = "name" | "place" | "type" | "year";
const COLUMNS: { key: Key; label: string }[] = [
{ key: "year", label: "Year" },
{ key: "name", label: "Project" },
{ key: "place", label: "Place" },
{ key: "type", label: "Type" },
];
function Photo({ p }: { p: Project }) {
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-arch__photo"
style={{ "--tone": p.tone } as CSSProperties}
>
{!missing && (
<img
ref={img}
src={p.image}
alt={p.alt}
onError={() => setMissing(true)}
/>
)}
</div>
);
}
export function ArchitectPortfolio() {
const [sort, setSort] = useState<{ key: Key; dir: 1 | -1 }>({
key: "year",
dir: -1,
});
const [selected, setSelected] = useState(PROJECTS[0].id);
const p = PROJECTS.find((x) => x.id === selected)!;
const rows = [...PROJECTS].sort((a, b) => {
const A = a[sort.key];
const B = b[sort.key];
return (A < B ? -1 : A > B ? 1 : 0) * sort.dir;
});
return (
<div className="gu-arch">
<nav className="gu-arch__nav" aria-label="Main">
<a href="#" className="gu-arch__logo">
Varga Lenz
<span>Architects</span>
</a>
<a href="#arch-index">Projects</a>
<a href="#arch-office">Office</a>
</nav>
<header className="gu-arch__hero">
<h1>We build few buildings, slowly, from what the site already has.</h1>
</header>
<section
id="arch-index"
className="gu-arch__index"
aria-labelledby="gu-arch-index"
>
<h2 id="gu-arch-index" className="gu-arch__label">
Index of projects
</h2>
<div className="gu-arch__detail" key={p.id} aria-live="polite">
<Photo p={p} />
<div className="gu-arch__plan">
<svg
viewBox="0 0 200 140"
role="img"
aria-label={`Floor plan of ${p.name}`}
>
<path d={p.plan} pathLength={1} />
</svg>
<div>
<p className="gu-arch__pname">{p.name}</p>
<p>{p.note}</p>
<p className="gu-arch__area">
{p.area.toLocaleString("en-GB")} m²
</p>
</div>
</div>
</div>
<table className="gu-arch__table">
<thead>
<tr>
{COLUMNS.map((c) => {
const active = sort.key === c.key;
return (
<th
key={c.key}
scope="col"
aria-sort={
active
? sort.dir === 1
? "ascending"
: "descending"
: "none"
}
className={`is-${c.key}`}
>
<button
type="button"
onClick={() =>
setSort((s) => ({
key: c.key,
dir: s.key === c.key ? (s.dir === 1 ? -1 : 1) : 1,
}))
}
>
{c.label}
<span aria-hidden="true">
{active ? (sort.dir === 1 ? "↑" : "↓") : ""}
</span>
</button>
</th>
);
})}
</tr>
</thead>
<tbody>
{rows.map((r) => (
<tr
key={r.id}
className={r.id === selected ? "is-selected" : ""}
onClick={() => setSelected(r.id)}
>
<td className="is-year">{r.year}</td>
<td className="is-name">
<button
type="button"
aria-pressed={r.id === selected}
onClick={() => setSelected(r.id)}
>
{r.name}
</button>
</td>
<td className="is-place">{r.place}</td>
<td className="is-type">{r.type}</td>
</tr>
))}
</tbody>
</table>
</section>
<section
id="arch-office"
className="gu-arch__office"
aria-labelledby="gu-arch-office"
>
<h2 id="gu-arch-office" className="gu-arch__label">
Office
</h2>
<p>
Ana Varga and Tobias Lenz founded the practice in Vienna in 2014.
Eleven people, one long table, and a rule that every project starts
with a week on site.
</p>
<address>
Kettenbrückengasse 00, 1050 Vienna
<br />
<a href="mailto:office@example.com">office@example.com</a>
</address>
</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: Architect 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 quiet, light portfolio for a small architecture practice ("Varga Lenz Architects", Vienna). Its signature: a sortable project index table. Choosing a project shows its photo and draws its floor plan line by line, from SVG drawn in code. Sections: nav, a one-sentence hero in light type, the index (detail panel and table), and an office block with an address.
## Palette
Background #f3eee3, surface #fbf8f2, text #0e0e10, muted #57534b, lines rgba(14,14,16,0.16), accent #ff5a1f (reserved, barely used), focus #2b35ff. The hero is weight 300 to feel calm; names and numbers use 700–800.
## Layout
- Root uses container queries (container-type: inline-size) and overflow-x: clip, so the detail panel can stick. Side padding 5%. Rules: a 1px ink line under the nav and above the office.
- Hero: one sentence up to 5rem, weight 300, max 20ch.
- Index at ≥780px: a label across the top, then the table on the left (1.1fr) and the detail panel on the right (1fr, `position: sticky; top: 24px`). On phones the panel sits above the table.
- Detail: a 3:2 photo, then a two-column row: the plan on a 10px grid-paper background, and the project name, a one-sentence note and the floor area in large light numerals.
- Table: real thead/tbody. Headers are buttons (Year, Project, Place, Type) that sort; clicking the active one flips the direction, and an arrow shows it. Rows highlight on hover; the selected row inverts to ink with cream text. Place and Type hide under 640px.
## Floor plans
Each project has SVG path data on a 200×140 grid (outer walls as a closed rectangle plus interior wall lines). The path uses pathLength="1", stroke-dasharray 1 and stroke-dashoffset 1, animated to 0 over 1.6s, so it draws itself every time a project is chosen (the panel remounts with a key).
## Images
Four project photos (1800×1200, 3:2). Until a file exists, the frame shows a toned gradient with thin vertical lines.
## Accessibility
- Sortable headers use aria-sort (ascending, descending, none). The project name in each row is a real button with aria-pressed; the whole row is also clickable for mouse users.
- The plan SVG has role="img" and "Floor plan of …". The detail panel is aria-live="polite", so the new project is announced.
- prefers-reduced-motion: plans appear fully drawn and the panel swaps without a fade.
## 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.
### ArchitectPortfolio.tsx
```tsx
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./architect-portfolio.css";
/**
* ArchitectPortfolio: a quiet portfolio for an architecture practice ("Varga Lenz").
* Its signature: a sortable project index. Choosing a project shows its photo and
* draws its floor plan line by line (SVG drawn in code).
*/
type Project = {
id: string;
name: string;
place: string;
type: string;
year: number;
area: number;
image: string;
alt: string;
tone: string;
/** Floor plan walls as SVG path data on a 200×140 grid */
plan: string;
note: string;
};
const PROJECTS: Project[] = [
{
id: "slope",
name: "House on a slope",
place: "Ticino, Switzerland",
type: "House",
year: 2026,
area: 240,
image: "/images/portfolio-architect-project-01.jpg",
alt: "A board-marked concrete house stepping down a green hillside with a long window band",
tone: "#8c8a83",
plan: "M10 20H190V120H10Z M10 70H90 M90 20V120 M140 20V70 M140 70H190 M40 120V100 M150 120V96",
note: "Three split levels follow the hill, so every room opens to the lake at a different height.",
},
{
id: "library",
name: "Neighbourhood library",
place: "Ljubljana, Slovenia",
type: "Public",
year: 2025,
area: 1850,
image: "/images/portfolio-architect-project-02.jpg",
alt: "A library reading room with tall timber fins and daylight from a sawtooth roof",
tone: "#a08b6d",
plan: "M10 10H190V130H10Z M10 50H120 M120 10V130 M60 50V130 M120 90H190 M150 10V50",
note: "A sawtooth roof brings north light into every reading table; the children's room opens to a garden.",
},
{
id: "cellar",
name: "Winery and cellar",
place: "Tokaj, Hungary",
type: "Work",
year: 2024,
area: 960,
image: "/images/portfolio-architect-project-03.jpg",
alt: "A long rammed-earth wall of a winery set into vineyard terraces at dusk",
tone: "#7a5a46",
plan: "M10 40H190V100H10Z M60 40V100 M130 40V100 M10 70H60 M130 70H190 M90 100V130H100V100",
note: "Rammed earth from the site keeps the cellar at 12 °C all year without mechanical cooling.",
},
{
id: "courtyard",
name: "Courtyard housing",
place: "Vienna, Austria",
type: "Housing",
year: 2023,
area: 4200,
image: "/images/portfolio-architect-project-04.jpg",
alt: "A planted inner courtyard surrounded by four storeys of brick housing with deep balconies",
tone: "#9a6b4f",
plan: "M10 10H190V130H10Z M50 50H150V90H50Z M10 50H50 M150 50H190 M100 10V50 M100 90V130",
note: "Thirty-two flats around one shared courtyard; every flat has windows on two sides.",
},
];
type Key = "name" | "place" | "type" | "year";
const COLUMNS: { key: Key; label: string }[] = [
{ key: "year", label: "Year" },
{ key: "name", label: "Project" },
{ key: "place", label: "Place" },
{ key: "type", label: "Type" },
];
function Photo({ p }: { p: Project }) {
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-arch__photo"
style={{ "--tone": p.tone } as CSSProperties}
>
{!missing && (
<img
ref={img}
src={p.image}
alt={p.alt}
onError={() => setMissing(true)}
/>
)}
</div>
);
}
export function ArchitectPortfolio() {
const [sort, setSort] = useState<{ key: Key; dir: 1 | -1 }>({
key: "year",
dir: -1,
});
const [selected, setSelected] = useState(PROJECTS[0].id);
const p = PROJECTS.find((x) => x.id === selected)!;
const rows = [...PROJECTS].sort((a, b) => {
const A = a[sort.key];
const B = b[sort.key];
return (A < B ? -1 : A > B ? 1 : 0) * sort.dir;
});
return (
<div className="gu-arch">
<nav className="gu-arch__nav" aria-label="Main">
<a href="#" className="gu-arch__logo">
Varga Lenz
<span>Architects</span>
</a>
<a href="#arch-index">Projects</a>
<a href="#arch-office">Office</a>
</nav>
<header className="gu-arch__hero">
<h1>We build few buildings, slowly, from what the site already has.</h1>
</header>
<section
id="arch-index"
className="gu-arch__index"
aria-labelledby="gu-arch-index"
>
<h2 id="gu-arch-index" className="gu-arch__label">
Index of projects
</h2>
<div className="gu-arch__detail" key={p.id} aria-live="polite">
<Photo p={p} />
<div className="gu-arch__plan">
<svg
viewBox="0 0 200 140"
role="img"
aria-label={`Floor plan of ${p.name}`}
>
<path d={p.plan} pathLength={1} />
</svg>
<div>
<p className="gu-arch__pname">{p.name}</p>
<p>{p.note}</p>
<p className="gu-arch__area">
{p.area.toLocaleString("en-GB")} m²
</p>
</div>
</div>
</div>
<table className="gu-arch__table">
<thead>
<tr>
{COLUMNS.map((c) => {
const active = sort.key === c.key;
return (
<th
key={c.key}
scope="col"
aria-sort={
active
? sort.dir === 1
? "ascending"
: "descending"
: "none"
}
className={`is-${c.key}`}
>
<button
type="button"
onClick={() =>
setSort((s) => ({
key: c.key,
dir: s.key === c.key ? (s.dir === 1 ? -1 : 1) : 1,
}))
}
>
{c.label}
<span aria-hidden="true">
{active ? (sort.dir === 1 ? "↑" : "↓") : ""}
</span>
</button>
</th>
);
})}
</tr>
</thead>
<tbody>
{rows.map((r) => (
<tr
key={r.id}
className={r.id === selected ? "is-selected" : ""}
onClick={() => setSelected(r.id)}
>
<td className="is-year">{r.year}</td>
<td className="is-name">
<button
type="button"
aria-pressed={r.id === selected}
onClick={() => setSelected(r.id)}
>
{r.name}
</button>
</td>
<td className="is-place">{r.place}</td>
<td className="is-type">{r.type}</td>
</tr>
))}
</tbody>
</table>
</section>
<section
id="arch-office"
className="gu-arch__office"
aria-labelledby="gu-arch-office"
>
<h2 id="gu-arch-office" className="gu-arch__label">
Office
</h2>
<p>
Ana Varga and Tobias Lenz founded the practice in Vienna in 2014.
Eleven people, one long table, and a rule that every project starts
with a week on site.
</p>
<address>
Kettenbrückengasse 00, 1050 Vienna
<br />
<a href="mailto:office@example.com">office@example.com</a>
</address>
</section>
</div>
);
}
```
### architect-portfolio.css
```css
/* ArchitectPortfolio: change these colors to match your brand. */
.gu-arch {
--bg: #f3eee3;
--surface: #fbf8f2;
--text: #0e0e10;
--muted: #57534b;
--line: rgb(14 14 16 / 0.16);
--accent: #ff5a1f;
--focus: #2b35ff;
--ease: cubic-bezier(0.16, 1, 0.3, 1);
container-type: inline-size;
/* clip (not hidden) so the detail panel can stick */
overflow-x: clip;
background: var(--bg);
color: var(--text);
font-family: system-ui, sans-serif;
}
.gu-arch a {
color: inherit;
}
.gu-arch :focus-visible {
outline: 2px solid var(--focus);
outline-offset: 3px;
}
.gu-arch h1,
.gu-arch h2,
.gu-arch p {
margin: 0;
}
.gu-arch__nav {
display: flex;
align-items: baseline;
gap: 22px;
padding: 18px 5%;
border-bottom: 1px solid var(--text);
}
.gu-arch__nav a {
text-decoration: none;
}
.gu-arch__logo {
display: flex;
gap: 8px;
margin-right: auto;
font-weight: 800;
letter-spacing: -0.01em;
}
.gu-arch__logo span {
font-weight: 400;
color: var(--muted);
}
.gu-arch__hero {
padding: 56px 5% 64px;
}
.gu-arch__hero h1 {
max-width: 20ch;
font-size: clamp(2.2rem, 6cqi, 5rem);
font-weight: 300;
line-height: 1.02;
letter-spacing: -0.035em;
text-wrap: balance;
}
.gu-arch__label {
font-size: 0.9rem;
font-weight: 600;
color: var(--muted);
}
/* Index: detail panel and table */
.gu-arch__index {
display: grid;
gap: 24px;
padding: 0 5% 64px;
}
@container (min-width: 780px) {
.gu-arch__index {
grid-template-columns: 1.1fr 1fr;
grid-template-rows: auto 1fr;
column-gap: 5%;
align-items: start;
}
.gu-arch__index > .gu-arch__label {
grid-column: 1 / -1;
}
.gu-arch__detail {
grid-column: 2;
grid-row: 2;
position: sticky;
top: 24px;
}
.gu-arch__table {
grid-column: 1;
grid-row: 2;
}
}
.gu-arch__detail {
display: grid;
gap: 16px;
animation: gu-arch-in 0.6s var(--ease);
}
@keyframes gu-arch-in {
from {
opacity: 0;
}
}
.gu-arch__photo {
position: relative;
overflow: hidden;
aspect-ratio: 3 / 2;
background:
repeating-linear-gradient(
90deg,
rgb(255 255 255 / 0.1) 0 1px,
transparent 1px 22px
),
linear-gradient(
160deg,
color-mix(in srgb, var(--tone) 60%, #fff),
var(--tone)
);
}
.gu-arch__photo img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.gu-arch__plan {
display: grid;
grid-template-columns: minmax(120px, 0.9fr) 1fr;
gap: 18px;
align-items: start;
}
.gu-arch__plan svg {
width: 100%;
background:
linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 10px 10px,
linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 10px 10px,
var(--surface);
}
.gu-arch__plan path {
fill: none;
stroke: var(--text);
stroke-width: 2.4;
stroke-linecap: square;
stroke-dasharray: 1;
stroke-dashoffset: 1;
animation: gu-arch-draw 1.6s var(--ease) 0.2s forwards;
}
@keyframes gu-arch-draw {
to {
stroke-dashoffset: 0;
}
}
.gu-arch__pname {
font-weight: 800;
}
.gu-arch__plan p:not(.gu-arch__pname):not(.gu-arch__area) {
margin-top: 6px;
font-size: 0.92rem;
line-height: 1.5;
color: var(--muted);
}
.gu-arch__area {
margin-top: 10px !important;
font-size: 1.6rem;
font-weight: 300;
letter-spacing: -0.03em;
}
.gu-arch__table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
.gu-arch__table th {
padding: 0;
border-bottom: 1px solid var(--text);
text-align: left;
}
.gu-arch__table th button {
display: inline-flex;
gap: 6px;
min-height: 44px;
align-items: center;
padding: 0;
border: 0;
background: none;
color: var(--muted);
font: inherit;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
}
.gu-arch__table th[aria-sort="ascending"] button,
.gu-arch__table th[aria-sort="descending"] button {
color: var(--text);
}
.gu-arch__table td {
padding: 14px 12px 14px 0;
border-bottom: 1px solid var(--line);
vertical-align: baseline;
}
.gu-arch__table tbody tr {
cursor: pointer;
transition: background-color 0.2s;
}
.gu-arch__table tbody tr:hover {
background: var(--surface);
}
.gu-arch__table tbody tr.is-selected {
background: var(--text);
color: var(--bg);
}
.gu-arch__table tbody tr.is-selected td:first-child {
padding-left: 10px;
}
.gu-arch__table .is-name button {
padding: 0;
border: 0;
background: none;
color: inherit;
font: inherit;
font-size: 1.15rem;
font-weight: 700;
letter-spacing: -0.02em;
text-align: left;
cursor: pointer;
}
.gu-arch__table td.is-year {
width: 4.5em;
color: inherit;
}
.gu-arch__table .is-place,
.gu-arch__table .is-type {
font-size: 0.92rem;
}
@container (max-width: 640px) {
.gu-arch__table .is-place,
.gu-arch__table .is-type {
display: none;
}
}
/* Office */
.gu-arch__office {
display: grid;
gap: 20px;
padding: 56px 5% 72px;
border-top: 1px solid var(--text);
}
@container (min-width: 760px) {
.gu-arch__office {
grid-template-columns: 1fr 2fr 1.2fr;
}
}
.gu-arch__office p {
max-width: 44ch;
font-size: 1.15rem;
line-height: 1.55;
}
.gu-arch__office address {
font-style: normal;
line-height: 1.6;
color: var(--muted);
}
.gu-arch__office address a {
color: var(--text);
font-weight: 700;
text-underline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.gu-arch__detail {
animation: none;
}
.gu-arch__plan path {
animation: none;
stroke-dashoffset: 0;
}
.gu-arch__table tbody tr {
transition: none;
}
}
```
You might also want
Next piece: Aurora background3D artist portfolio
Portfolios, advanced
Designer portfolio
Portfolios, advanced
Fashion designer portfolio with a lookbook loupe
Portfolios, advanced
