Estate agent landing page with a local map
A calm page for a neighbourhood estate agent: homes are pins on a drawn map you filter by price and bedrooms, each opens a card where you book a viewing, and a mortgage calculator splits the loan from the interest in a rolling donut.
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./homes-page.css";
/**
* HomesPage: a landing page for a small neighbourhood estate agent.
* Its signature is a drawn map of the area: homes are pins you filter by
* price and bedrooms; pick one to see it and book a viewing. Below, a
* mortgage calculator with a donut that splits what you borrow from the interest.
* It is a demo: connect `onBook` to your diary or CRM.
*/
type Home = {
id: string;
street: string;
kind: string;
beds: number;
price: number;
x: number;
y: number;
img: string;
tone: string;
note: string;
};
const HOMES: Home[] = [
{ id: "h1", street: "14 Mafeking Terrace", kind: "Brick terrace", beds: 3, price: 285000, x: 128, y: 96, img: "/images/landing-homes-brick-01.jpg", tone: "#9a5b43", note: "Bay window, cellar, south-facing yard." },
{ id: "h2", street: "2 Rowan Close", kind: "Bungalow", beds: 2, price: 245000, x: 352, y: 72, img: "/images/landing-homes-bungalow-02.jpg", tone: "#8a8f6a", note: "Level access and a long garden with a pear tree." },
{ id: "h3", street: "Flat 5, The Dye Works", kind: "Warehouse loft", beds: 1, price: 199000, x: 470, y: 224, img: "/images/landing-homes-loft-03.jpg", tone: "#6c6f78", note: "Five-metre ceilings and iron windows over the canal." },
{ id: "h4", street: "37 Chapel Street", kind: "Brick terrace", beds: 2, price: 232000, x: 196, y: 214, img: "/images/landing-homes-brick-01.jpg", tone: "#a3664c", note: "New kitchen, two minutes from the station." },
{ id: "h5", street: "9 Orchard Rise", kind: "Bungalow", beds: 3, price: 349000, x: 300, y: 286, img: "/images/landing-homes-bungalow-02.jpg", tone: "#7c8460", note: "Corner plot, garage and room to extend." },
{ id: "h6", street: "Flat 12, Mill Yard", kind: "Warehouse loft", beds: 2, price: 315000, x: 540, y: 120, img: "/images/landing-homes-loft-03.jpg", tone: "#5f626b", note: "Roof terrace with a view of the viaduct." },
];
const SLOTS = ["Sat 10:00", "Sat 11:30", "Mon 17:30", "Wed 18:00"];
const RATE = 4.6;
const money = (n: number) => "£" + Math.round(n).toLocaleString("en-GB");
function Photo({ src, alt, tone, className = "" }: { src: string; alt: string; tone: string; className?: string }) {
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 (
<span className={`gu-keys__photo ${className}`} style={{ "--tone": tone } as CSSProperties}>
{!missing && <img ref={img} src={src} alt={alt} loading="lazy" onError={() => setMissing(true)} />}
</span>
);
}
/** Eases a number towards its target so totals roll rather than jump. */
function useRolling(target: number) {
const [v, setV] = useState(target);
const from = useRef(target);
useEffect(() => {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
const id = requestAnimationFrame(() => setV(target));
from.current = target;
return () => cancelAnimationFrame(id);
}
const a = from.current;
let raf = 0;
let t0 = 0;
const step = (now: number) => {
if (!t0) t0 = now;
const k = Math.min(1, (now - t0) / 500);
const val = a + (target - a) * (1 - Math.pow(1 - k, 3));
from.current = val;
setV(val);
if (k < 1) raf = requestAnimationFrame(step);
};
raf = requestAnimationFrame(step);
return () => cancelAnimationFrame(raf);
}, [target]);
return v;
}
export function HomesPage({ onBook }: { onBook?: (homeId: string, slot: string) => void }) {
const [max, setMax] = useState(350000);
const [beds, setBeds] = useState(0);
const [sel, setSel] = useState("h1");
const [slot, setSlot] = useState<string | null>(null);
const [booked, setBooked] = useState<string | null>(null);
const [deposit, setDeposit] = useState(15);
const [term, setTerm] = useState(25);
const fits = (h: Home) => h.price <= max && h.beds >= beds;
const shown = HOMES.filter(fits);
const home = HOMES.find((h) => h.id === sel) ?? HOMES[0];
const loan = home.price * (1 - deposit / 100);
const r = RATE / 100 / 12;
const n = term * 12;
const monthly = (loan * r) / (1 - Math.pow(1 + r, -n));
const interest = monthly * n - loan;
const loanShare = (loan / (loan + interest)) * 100;
const rMonthly = useRolling(monthly);
const rShare = useRolling(loanShare);
const pick = (id: string) => {
setSel(id);
setSlot(null);
};
return (
<div className="gu-keys">
<header className="gu-keys__bar">
<a href="#" className="gu-keys__mark">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 11 12 4l9 7v9H3z" />
<circle cx="12" cy="14" r="2.4" />
</svg>
Holt & Lane
</a>
<nav aria-label="Holt and Lane">
<a href="#keys-map">For sale</a>
<a href="#keys-sums">Mortgage sums</a>
<a href="#keys-value" className="gu-keys__navcta">
Free valuation
</a>
</nav>
</header>
<section className="gu-keys__hero">
<h1>
Homes in Kirkstall,
<br />
sold by people who live here.
</h1>
<p>
We are three agents with one office on the high street. We know which side of
the road gets the sun and which cellars stay dry.
</p>
</section>
<section id="keys-map" className="gu-keys__finder" aria-labelledby="keys-map-title">
<h2 id="keys-map-title" className="gu-keys__sr">
Homes on the map
</h2>
<div className="gu-keys__filters">
<label className="gu-keys__range">
<span>
Up to <b>{money(max)}</b>
</span>
<input
type="range"
min={200000}
max={350000}
step={5000}
value={max}
onChange={(e) => setMax(Number(e.target.value))}
style={{ "--p": `${((max - 200000) / 150000) * 100}%` } as CSSProperties}
/>
</label>
<div className="gu-keys__beds" role="group" aria-label="Bedrooms">
{[0, 1, 2, 3].map((b) => (
<button key={b} type="button" aria-pressed={beds === b} onClick={() => setBeds(b)}>
{b === 0 ? "Any" : `${b}+ bed`}
</button>
))}
</div>
<p className="gu-keys__count" aria-live="polite">
{shown.length} of {HOMES.length} homes
</p>
</div>
<div className="gu-keys__mapwrap">
<svg viewBox="0 0 620 340" className="gu-keys__map" role="group" aria-label="Map of Kirkstall with homes for sale">
<defs>
<pattern id="keys-trees" width="14" height="14" patternUnits="userSpaceOnUse">
<circle cx="7" cy="7" r="3" className="gu-keys__tree" />
</pattern>
</defs>
<path d="M0 270 C120 250 180 310 300 318 S520 260 620 286 V340 H0Z" className="gu-keys__river" />
<path d="M0 270 C120 250 180 310 300 318 S520 260 620 286" className="gu-keys__ripple" />
<path d="M30 140 C60 130 90 170 70 200 C50 230 20 210 18 180Z" fill="url(#keys-trees)" className="gu-keys__park" />
<path d="M400 150 h110 v50 h-110z" fill="url(#keys-trees)" className="gu-keys__park" />
<g className="gu-keys__roads">
<path d="M0 150 C160 160 300 140 620 170" />
<path d="M240 0 C250 120 230 220 260 340" />
<path d="M90 40 L560 40" className="gu-keys__lane" />
<path d="M420 0 C430 90 500 140 610 230" className="gu-keys__lane" />
<path d="M120 60 L160 260" className="gu-keys__lane" />
</g>
<path d="M0 108 L620 64" className="gu-keys__rail" />
<text x="22" y="246" className="gu-keys__label">Abbey park</text>
<text x="404" y="144" className="gu-keys__label">Allotments</text>
<text x="330" y="334" className="gu-keys__label">River Aire</text>
<text x="470" y="58" className="gu-keys__label">Railway</text>
{HOMES.map((h, i) => {
const ok = fits(h);
const on = h.id === sel;
return (
<g
key={h.id}
role="button"
tabIndex={ok ? 0 : -1}
aria-label={`${h.street}, ${h.beds} bed, ${money(h.price)}`}
aria-pressed={on}
aria-hidden={!ok || undefined}
className="gu-keys__pin"
data-off={!ok || undefined}
data-on={on || undefined}
style={{ "--x": `${h.x}px`, "--y": `${h.y}px`, "--i": i } as CSSProperties}
onClick={() => ok && pick(h.id)}
onKeyDown={(e) => {
if (ok && (e.key === "Enter" || e.key === " ")) {
e.preventDefault();
pick(h.id);
}
}}
>
<circle r="26" className="gu-keys__pulse" />
<g className="gu-keys__drop">
<path d="M0 0 C-14 -16 -14 -36 0 -36 C14 -36 14 -16 0 0Z" />
<text y="-21">{h.beds}</text>
</g>
<rect x="-36" y="6" width="72" height="20" rx="10" className="gu-keys__tag" />
<text y="20" className="gu-keys__tagtext">
£{Math.round(h.price / 1000)}k
</text>
</g>
);
})}
</svg>
<article className="gu-keys__card" key={home.id} aria-live="polite">
<Photo src={home.img} alt={`${home.kind} at ${home.street}`} tone={home.tone} className="gu-keys__cardimg" />
<div className="gu-keys__cardbody">
<p className="gu-keys__kind">
{home.kind}, {home.beds} bed
</p>
<h3>{home.street}</h3>
<p className="gu-keys__price">{money(home.price)}</p>
<p>{home.note}</p>
{booked === home.id ? (
<p className="gu-keys__booked" role="status">
Viewing booked for {slot}. We’ll text you the day before.
</p>
) : (
<>
<div className="gu-keys__slots" role="group" aria-label="Viewing times">
{SLOTS.map((s) => (
<button key={s} type="button" aria-pressed={slot === s} onClick={() => setSlot(s)}>
{s}
</button>
))}
</div>
<button
type="button"
className="gu-keys__book"
disabled={!slot}
onClick={() => {
if (!slot) return;
onBook?.(home.id, slot);
setBooked(home.id);
}}
>
{slot ? `Book ${slot}` : "Pick a time to view"}
</button>
</>
)}
</div>
</article>
</div>
</section>
<section id="keys-sums" className="gu-keys__sums" aria-labelledby="keys-sums-title">
<div className="gu-keys__sumscopy">
<h2 id="keys-sums-title">What would it cost each month?</h2>
<p>
For {home.street} at {money(home.price)}. We use a {RATE}% fixed rate as a guide; your broker will
give you the real one.
</p>
<label className="gu-keys__range">
<span>
Deposit <b>{deposit}%</b> ({money(home.price * (deposit / 100))})
</span>
<input
type="range"
min={5}
max={40}
value={deposit}
onChange={(e) => setDeposit(Number(e.target.value))}
style={{ "--p": `${((deposit - 5) / 35) * 100}%` } as CSSProperties}
/>
</label>
<div className="gu-keys__beds" role="group" aria-label="Mortgage term">
{[15, 25, 35].map((t) => (
<button key={t} type="button" aria-pressed={term === t} onClick={() => setTerm(t)}>
{t} years
</button>
))}
</div>
</div>
<div className="gu-keys__donutwrap">
<svg viewBox="0 0 200 200" className="gu-keys__donut" aria-hidden="true">
<circle cx="100" cy="100" r="80" className="gu-keys__ring-int" pathLength={100} />
<circle
cx="100"
cy="100"
r="80"
className="gu-keys__ring-loan"
pathLength={100}
strokeDasharray={`${rShare} 100`}
/>
</svg>
<div className="gu-keys__monthly">
<b>{money(rMonthly)}</b>
<span>a month</span>
</div>
<dl className="gu-keys__legend">
<div>
<dt>
<i className="gu-keys__k-loan" /> You borrow
</dt>
<dd>{money(loan)}</dd>
</div>
<div>
<dt>
<i className="gu-keys__k-int" /> Interest over {term} years
</dt>
<dd>{money(interest)}</dd>
</div>
</dl>
</div>
</section>
<section id="keys-value" className="gu-keys__value">
<h2>Selling? We’ll walk round and tell you the honest number.</h2>
<a href="#" className="gu-keys__cta">
Book a free valuation
</a>
</section>
<footer className="gu-keys__foot">
<span>© 2026 Holt & Lane, 41 Kirkstall Road, Leeds</span>
<a href="#">Lettings</a>
<a href="#">Fees</a>
</footer>
</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: Estate agent landing page with a local map
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 calm landing page for a small neighbourhood estate agent ("Holt & Lane, Kirkstall, Leeds"). Its signature is a drawn SVG map of the area: a river with flowing ripples, white roads and lanes, a dotted railway, tree-dotted park and allotments, and six homes as teardrop pins (the bed count inside, a price tag under it). Pins drop in one after another. An "Up to" price slider (£200k to £350k) and bedroom chips (Any, 1+, 2+, 3+) filter them: homes that don't fit fade and shrink, and a count line updates. Clicking (or Enter on) a pin makes it brick red with a pulsing ring and swaps the card beside the map: photo (zooms in), type and beds, street, price, a line about it, four viewing times and a Book button that confirms. The second interaction is "What would it cost each month?": for the selected home, a deposit slider (5–40%) and a 15/25/35-year term work out a repayment at a 4.6% guide rate. A donut splits what you borrow from the total interest, and the monthly figure in its centre rolls to new values.
## Palette
Background #f1f2ee, map paper #e6e9e1, ink #1d2a3a, muted #5d6877, brick #b5532c, water #b8d1d6, trees #9eb386, focus #2b35ff. The sums band is ink with a blue loan ring #8fb3c9 and a peach interest ring #e9a47f. Headings use an old-style serif (Iowan Old Style, Palatino); the rest is system-ui.
## Layout
- Bar: a house-and-key mark, the name, links and an outlined "Free valuation" pill.
- Hero: a two-line serif headline and a short paragraph beside it.
- Finder: filters row, then the map (wide) with the home card on the right. Below 760px the card sits under the map with the photo beside the text; below 560px it stacks.
- Sums: a rounded ink panel with the copy and controls on the left, the donut and legend on the right.
- A valuation call to action and a footer.
## Images
- landing-homes-brick-01.jpg, landing-homes-bungalow-02.jpg, landing-homes-loft-03.jpg (4:3); each is shared by the two homes of its type. Until a file exists, the frame shows a tone.
## Accessibility
- Pins are role="button" with aria-pressed and a label giving the street, beds and price; filtered pins leave the tab order.
- Chips use aria-pressed; the count and the card are aria-live; the booked line is role="status".
- prefers-reduced-motion turns off every animation and transition.
## Connect it
`onBook(homeId, slot)` fires when a viewing is booked.
## 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.
### HomesPage.tsx
```tsx
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./homes-page.css";
/**
* HomesPage: a landing page for a small neighbourhood estate agent.
* Its signature is a drawn map of the area: homes are pins you filter by
* price and bedrooms; pick one to see it and book a viewing. Below, a
* mortgage calculator with a donut that splits what you borrow from the interest.
* It is a demo: connect `onBook` to your diary or CRM.
*/
type Home = {
id: string;
street: string;
kind: string;
beds: number;
price: number;
x: number;
y: number;
img: string;
tone: string;
note: string;
};
const HOMES: Home[] = [
{ id: "h1", street: "14 Mafeking Terrace", kind: "Brick terrace", beds: 3, price: 285000, x: 128, y: 96, img: "/images/landing-homes-brick-01.jpg", tone: "#9a5b43", note: "Bay window, cellar, south-facing yard." },
{ id: "h2", street: "2 Rowan Close", kind: "Bungalow", beds: 2, price: 245000, x: 352, y: 72, img: "/images/landing-homes-bungalow-02.jpg", tone: "#8a8f6a", note: "Level access and a long garden with a pear tree." },
{ id: "h3", street: "Flat 5, The Dye Works", kind: "Warehouse loft", beds: 1, price: 199000, x: 470, y: 224, img: "/images/landing-homes-loft-03.jpg", tone: "#6c6f78", note: "Five-metre ceilings and iron windows over the canal." },
{ id: "h4", street: "37 Chapel Street", kind: "Brick terrace", beds: 2, price: 232000, x: 196, y: 214, img: "/images/landing-homes-brick-01.jpg", tone: "#a3664c", note: "New kitchen, two minutes from the station." },
{ id: "h5", street: "9 Orchard Rise", kind: "Bungalow", beds: 3, price: 349000, x: 300, y: 286, img: "/images/landing-homes-bungalow-02.jpg", tone: "#7c8460", note: "Corner plot, garage and room to extend." },
{ id: "h6", street: "Flat 12, Mill Yard", kind: "Warehouse loft", beds: 2, price: 315000, x: 540, y: 120, img: "/images/landing-homes-loft-03.jpg", tone: "#5f626b", note: "Roof terrace with a view of the viaduct." },
];
const SLOTS = ["Sat 10:00", "Sat 11:30", "Mon 17:30", "Wed 18:00"];
const RATE = 4.6;
const money = (n: number) => "£" + Math.round(n).toLocaleString("en-GB");
function Photo({ src, alt, tone, className = "" }: { src: string; alt: string; tone: string; className?: string }) {
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 (
<span className={`gu-keys__photo ${className}`} style={{ "--tone": tone } as CSSProperties}>
{!missing && <img ref={img} src={src} alt={alt} loading="lazy" onError={() => setMissing(true)} />}
</span>
);
}
/** Eases a number towards its target so totals roll rather than jump. */
function useRolling(target: number) {
const [v, setV] = useState(target);
const from = useRef(target);
useEffect(() => {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
const id = requestAnimationFrame(() => setV(target));
from.current = target;
return () => cancelAnimationFrame(id);
}
const a = from.current;
let raf = 0;
let t0 = 0;
const step = (now: number) => {
if (!t0) t0 = now;
const k = Math.min(1, (now - t0) / 500);
const val = a + (target - a) * (1 - Math.pow(1 - k, 3));
from.current = val;
setV(val);
if (k < 1) raf = requestAnimationFrame(step);
};
raf = requestAnimationFrame(step);
return () => cancelAnimationFrame(raf);
}, [target]);
return v;
}
export function HomesPage({ onBook }: { onBook?: (homeId: string, slot: string) => void }) {
const [max, setMax] = useState(350000);
const [beds, setBeds] = useState(0);
const [sel, setSel] = useState("h1");
const [slot, setSlot] = useState<string | null>(null);
const [booked, setBooked] = useState<string | null>(null);
const [deposit, setDeposit] = useState(15);
const [term, setTerm] = useState(25);
const fits = (h: Home) => h.price <= max && h.beds >= beds;
const shown = HOMES.filter(fits);
const home = HOMES.find((h) => h.id === sel) ?? HOMES[0];
const loan = home.price * (1 - deposit / 100);
const r = RATE / 100 / 12;
const n = term * 12;
const monthly = (loan * r) / (1 - Math.pow(1 + r, -n));
const interest = monthly * n - loan;
const loanShare = (loan / (loan + interest)) * 100;
const rMonthly = useRolling(monthly);
const rShare = useRolling(loanShare);
const pick = (id: string) => {
setSel(id);
setSlot(null);
};
return (
<div className="gu-keys">
<header className="gu-keys__bar">
<a href="#" className="gu-keys__mark">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 11 12 4l9 7v9H3z" />
<circle cx="12" cy="14" r="2.4" />
</svg>
Holt & Lane
</a>
<nav aria-label="Holt and Lane">
<a href="#keys-map">For sale</a>
<a href="#keys-sums">Mortgage sums</a>
<a href="#keys-value" className="gu-keys__navcta">
Free valuation
</a>
</nav>
</header>
<section className="gu-keys__hero">
<h1>
Homes in Kirkstall,
<br />
sold by people who live here.
</h1>
<p>
We are three agents with one office on the high street. We know which side of
the road gets the sun and which cellars stay dry.
</p>
</section>
<section id="keys-map" className="gu-keys__finder" aria-labelledby="keys-map-title">
<h2 id="keys-map-title" className="gu-keys__sr">
Homes on the map
</h2>
<div className="gu-keys__filters">
<label className="gu-keys__range">
<span>
Up to <b>{money(max)}</b>
</span>
<input
type="range"
min={200000}
max={350000}
step={5000}
value={max}
onChange={(e) => setMax(Number(e.target.value))}
style={{ "--p": `${((max - 200000) / 150000) * 100}%` } as CSSProperties}
/>
</label>
<div className="gu-keys__beds" role="group" aria-label="Bedrooms">
{[0, 1, 2, 3].map((b) => (
<button key={b} type="button" aria-pressed={beds === b} onClick={() => setBeds(b)}>
{b === 0 ? "Any" : `${b}+ bed`}
</button>
))}
</div>
<p className="gu-keys__count" aria-live="polite">
{shown.length} of {HOMES.length} homes
</p>
</div>
<div className="gu-keys__mapwrap">
<svg viewBox="0 0 620 340" className="gu-keys__map" role="group" aria-label="Map of Kirkstall with homes for sale">
<defs>
<pattern id="keys-trees" width="14" height="14" patternUnits="userSpaceOnUse">
<circle cx="7" cy="7" r="3" className="gu-keys__tree" />
</pattern>
</defs>
<path d="M0 270 C120 250 180 310 300 318 S520 260 620 286 V340 H0Z" className="gu-keys__river" />
<path d="M0 270 C120 250 180 310 300 318 S520 260 620 286" className="gu-keys__ripple" />
<path d="M30 140 C60 130 90 170 70 200 C50 230 20 210 18 180Z" fill="url(#keys-trees)" className="gu-keys__park" />
<path d="M400 150 h110 v50 h-110z" fill="url(#keys-trees)" className="gu-keys__park" />
<g className="gu-keys__roads">
<path d="M0 150 C160 160 300 140 620 170" />
<path d="M240 0 C250 120 230 220 260 340" />
<path d="M90 40 L560 40" className="gu-keys__lane" />
<path d="M420 0 C430 90 500 140 610 230" className="gu-keys__lane" />
<path d="M120 60 L160 260" className="gu-keys__lane" />
</g>
<path d="M0 108 L620 64" className="gu-keys__rail" />
<text x="22" y="246" className="gu-keys__label">Abbey park</text>
<text x="404" y="144" className="gu-keys__label">Allotments</text>
<text x="330" y="334" className="gu-keys__label">River Aire</text>
<text x="470" y="58" className="gu-keys__label">Railway</text>
{HOMES.map((h, i) => {
const ok = fits(h);
const on = h.id === sel;
return (
<g
key={h.id}
role="button"
tabIndex={ok ? 0 : -1}
aria-label={`${h.street}, ${h.beds} bed, ${money(h.price)}`}
aria-pressed={on}
aria-hidden={!ok || undefined}
className="gu-keys__pin"
data-off={!ok || undefined}
data-on={on || undefined}
style={{ "--x": `${h.x}px`, "--y": `${h.y}px`, "--i": i } as CSSProperties}
onClick={() => ok && pick(h.id)}
onKeyDown={(e) => {
if (ok && (e.key === "Enter" || e.key === " ")) {
e.preventDefault();
pick(h.id);
}
}}
>
<circle r="26" className="gu-keys__pulse" />
<g className="gu-keys__drop">
<path d="M0 0 C-14 -16 -14 -36 0 -36 C14 -36 14 -16 0 0Z" />
<text y="-21">{h.beds}</text>
</g>
<rect x="-36" y="6" width="72" height="20" rx="10" className="gu-keys__tag" />
<text y="20" className="gu-keys__tagtext">
£{Math.round(h.price / 1000)}k
</text>
</g>
);
})}
</svg>
<article className="gu-keys__card" key={home.id} aria-live="polite">
<Photo src={home.img} alt={`${home.kind} at ${home.street}`} tone={home.tone} className="gu-keys__cardimg" />
<div className="gu-keys__cardbody">
<p className="gu-keys__kind">
{home.kind}, {home.beds} bed
</p>
<h3>{home.street}</h3>
<p className="gu-keys__price">{money(home.price)}</p>
<p>{home.note}</p>
{booked === home.id ? (
<p className="gu-keys__booked" role="status">
Viewing booked for {slot}. We’ll text you the day before.
</p>
) : (
<>
<div className="gu-keys__slots" role="group" aria-label="Viewing times">
{SLOTS.map((s) => (
<button key={s} type="button" aria-pressed={slot === s} onClick={() => setSlot(s)}>
{s}
</button>
))}
</div>
<button
type="button"
className="gu-keys__book"
disabled={!slot}
onClick={() => {
if (!slot) return;
onBook?.(home.id, slot);
setBooked(home.id);
}}
>
{slot ? `Book ${slot}` : "Pick a time to view"}
</button>
</>
)}
</div>
</article>
</div>
</section>
<section id="keys-sums" className="gu-keys__sums" aria-labelledby="keys-sums-title">
<div className="gu-keys__sumscopy">
<h2 id="keys-sums-title">What would it cost each month?</h2>
<p>
For {home.street} at {money(home.price)}. We use a {RATE}% fixed rate as a guide; your broker will
give you the real one.
</p>
<label className="gu-keys__range">
<span>
Deposit <b>{deposit}%</b> ({money(home.price * (deposit / 100))})
</span>
<input
type="range"
min={5}
max={40}
value={deposit}
onChange={(e) => setDeposit(Number(e.target.value))}
style={{ "--p": `${((deposit - 5) / 35) * 100}%` } as CSSProperties}
/>
</label>
<div className="gu-keys__beds" role="group" aria-label="Mortgage term">
{[15, 25, 35].map((t) => (
<button key={t} type="button" aria-pressed={term === t} onClick={() => setTerm(t)}>
{t} years
</button>
))}
</div>
</div>
<div className="gu-keys__donutwrap">
<svg viewBox="0 0 200 200" className="gu-keys__donut" aria-hidden="true">
<circle cx="100" cy="100" r="80" className="gu-keys__ring-int" pathLength={100} />
<circle
cx="100"
cy="100"
r="80"
className="gu-keys__ring-loan"
pathLength={100}
strokeDasharray={`${rShare} 100`}
/>
</svg>
<div className="gu-keys__monthly">
<b>{money(rMonthly)}</b>
<span>a month</span>
</div>
<dl className="gu-keys__legend">
<div>
<dt>
<i className="gu-keys__k-loan" /> You borrow
</dt>
<dd>{money(loan)}</dd>
</div>
<div>
<dt>
<i className="gu-keys__k-int" /> Interest over {term} years
</dt>
<dd>{money(interest)}</dd>
</div>
</dl>
</div>
</section>
<section id="keys-value" className="gu-keys__value">
<h2>Selling? We’ll walk round and tell you the honest number.</h2>
<a href="#" className="gu-keys__cta">
Book a free valuation
</a>
</section>
<footer className="gu-keys__foot">
<span>© 2026 Holt & Lane, 41 Kirkstall Road, Leeds</span>
<a href="#">Lettings</a>
<a href="#">Fees</a>
</footer>
</div>
);
}
```
### homes-page.css
```css
/* HomesPage: Holt & Lane. A drawn local map, slate ink and brick. */
.gu-keys {
--bg: #f1f2ee;
--paper: #e6e9e1;
--ink: #1d2a3a;
--muted: #5d6877;
--brick: #b5532c;
--water: #b8d1d6;
--park: #bccaa6;
--line: rgb(29 42 58 / 0.14);
--focus: #2b35ff;
--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
container-type: inline-size;
overflow: hidden;
background: var(--bg);
color: var(--ink);
font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.gu-keys *,
.gu-keys *::before,
.gu-keys *::after {
box-sizing: border-box;
}
.gu-keys a {
color: inherit;
}
.gu-keys button {
font: inherit;
color: inherit;
cursor: pointer;
}
.gu-keys :focus-visible {
outline: 3px solid var(--focus);
outline-offset: 3px;
}
.gu-keys h1,
.gu-keys h2,
.gu-keys h3 {
font-family: var(--serif);
font-weight: 500;
margin: 0;
line-height: 1.1;
}
.gu-keys__sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.gu-keys__photo {
display: block;
overflow: hidden;
background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 60%, #fff), var(--tone));
}
.gu-keys__photo img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
/* Bar */
.gu-keys__bar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
padding: 16px clamp(16px, 4cqi, 40px);
}
.gu-keys__mark {
display: flex;
align-items: center;
gap: 8px;
font-family: var(--serif);
font-size: 22px;
text-decoration: none;
}
.gu-keys__mark svg {
width: 26px;
height: 26px;
fill: none;
stroke: var(--brick);
stroke-width: 2;
stroke-linejoin: round;
}
.gu-keys__bar nav {
display: flex;
gap: 18px;
align-items: center;
font-size: 15px;
}
.gu-keys__bar nav a {
text-decoration: none;
color: var(--muted);
}
.gu-keys__bar nav a:hover {
color: var(--ink);
}
.gu-keys__bar nav .gu-keys__navcta {
color: var(--ink);
border: 1.5px solid var(--ink);
border-radius: 999px;
padding: 8px 14px;
transition: background 0.2s, color 0.2s;
}
.gu-keys__bar nav .gu-keys__navcta:hover {
background: var(--ink);
color: var(--bg);
}
/* Hero */
.gu-keys__hero {
padding: 48px clamp(16px, 4cqi, 40px) 28px;
display: grid;
grid-template-columns: 1.4fr 1fr;
gap: 32px;
align-items: end;
}
.gu-keys__hero h1 {
font-size: clamp(36px, 6cqi, 64px);
letter-spacing: -0.01em;
animation: gu-keys-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gu-keys__hero p {
margin: 0;
color: var(--muted);
max-width: 40ch;
animation: gu-keys-rise 0.8s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
/* Finder */
.gu-keys__finder {
padding: 0 clamp(16px, 4cqi, 40px) 56px;
}
.gu-keys__filters {
display: flex;
flex-wrap: wrap;
gap: 14px 24px;
align-items: end;
padding: 16px 0;
border-top: 1px solid var(--line);
}
.gu-keys__range {
display: grid;
gap: 6px;
min-width: 220px;
flex: 1 1 240px;
font-size: 14px;
color: var(--muted);
}
.gu-keys__range b {
color: var(--ink);
font-variant-numeric: tabular-nums;
}
.gu-keys__range input {
appearance: none;
-webkit-appearance: none;
width: 100%;
height: 32px;
background: transparent;
cursor: pointer;
margin: 0;
}
.gu-keys__range input::-webkit-slider-runnable-track {
height: 6px;
border-radius: 3px;
background: linear-gradient(90deg, var(--brick) var(--p), var(--paper) var(--p));
}
.gu-keys__range input::-moz-range-track {
height: 6px;
border-radius: 3px;
background: linear-gradient(90deg, var(--brick) var(--p), var(--paper) var(--p));
}
.gu-keys__range input::-webkit-slider-thumb {
-webkit-appearance: none;
width: 24px;
height: 24px;
margin-top: -9px;
border-radius: 50%;
background: #fff;
border: 3px solid var(--brick);
box-shadow: 0 2px 6px rgb(29 42 58 / 0.25);
transition: transform 0.15s;
}
.gu-keys__range input::-moz-range-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: #fff;
border: 3px solid var(--brick);
}
.gu-keys__range input:active::-webkit-slider-thumb {
transform: scale(1.2);
}
.gu-keys__beds {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.gu-keys__beds button,
.gu-keys__slots button {
min-height: 42px;
padding: 0 14px;
border: 1px solid var(--line);
border-radius: 999px;
background: #fff;
font-size: 14px;
transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.gu-keys__beds button:hover,
.gu-keys__slots button:hover {
border-color: var(--ink);
}
.gu-keys__beds button[aria-pressed="true"],
.gu-keys__slots button[aria-pressed="true"] {
background: var(--ink);
border-color: var(--ink);
color: #fff;
}
.gu-keys__count {
margin: 0 0 10px;
font-size: 14px;
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.gu-keys__mapwrap {
display: grid;
grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
gap: 16px;
align-items: start;
}
.gu-keys__map {
display: block;
width: 100%;
height: auto;
background: var(--paper);
border-radius: 14px;
border: 1px solid var(--line);
}
.gu-keys__river {
fill: var(--water);
}
.gu-keys__ripple {
fill: none;
stroke: #fff;
stroke-width: 2;
stroke-dasharray: 6 14;
opacity: 0.8;
transform: translateY(8px);
animation: gu-keys-flow 4s linear infinite;
}
.gu-keys__park {
stroke: none;
}
.gu-keys__tree {
fill: #9eb386;
}
.gu-keys__roads path {
fill: none;
stroke: #fff;
stroke-width: 12;
stroke-linecap: round;
}
.gu-keys__roads .gu-keys__lane {
stroke-width: 6;
}
.gu-keys__rail {
fill: none;
stroke: var(--muted);
stroke-width: 3;
stroke-dasharray: 2 6;
opacity: 0.6;
}
.gu-keys__label {
font: italic 12px var(--serif);
fill: var(--muted);
}
.gu-keys__pin {
translate: var(--x) var(--y);
cursor: pointer;
outline: none;
transition: opacity 0.4s;
}
.gu-keys__drop {
transform-box: fill-box;
transform-origin: 50% 100%;
animation: gu-keys-drop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both;
animation-delay: calc(var(--i) * 90ms + 0.3s);
transition: scale 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.gu-keys__drop path {
fill: var(--ink);
stroke: #fff;
stroke-width: 2;
transition: fill 0.2s;
}
.gu-keys__drop text {
fill: #fff;
font: 700 13px system-ui, sans-serif;
text-anchor: middle;
}
.gu-keys__tag {
fill: #fff;
stroke: var(--line);
}
.gu-keys__tagtext {
font: 600 12px system-ui, sans-serif;
fill: var(--ink);
text-anchor: middle;
}
.gu-keys__pulse {
fill: var(--brick);
opacity: 0;
}
.gu-keys__pin:hover .gu-keys__drop,
.gu-keys__pin:focus-visible .gu-keys__drop {
scale: 1.15;
}
.gu-keys__pin:focus-visible .gu-keys__tag {
stroke: var(--focus);
stroke-width: 3;
}
.gu-keys__pin[data-on] .gu-keys__drop path {
fill: var(--brick);
}
.gu-keys__pin[data-on] .gu-keys__drop {
scale: 1.2;
}
.gu-keys__pin[data-on] .gu-keys__pulse {
transform-box: fill-box;
transform-origin: center;
animation: gu-keys-pulse 1.8s ease-out infinite;
}
.gu-keys__pin[data-off] {
opacity: 0.18;
cursor: default;
pointer-events: none;
}
.gu-keys__pin[data-off] .gu-keys__drop {
scale: 0.7;
}
.gu-keys__card {
background: #fff;
border-radius: 14px;
overflow: hidden;
border: 1px solid var(--line);
animation: gu-keys-card 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gu-keys__cardimg {
aspect-ratio: 4 / 3;
}
.gu-keys__cardimg img {
object-position: 50% 62%;
animation: gu-keys-zoom 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gu-keys__cardbody {
padding: 16px;
display: grid;
gap: 6px;
}
.gu-keys__cardbody p {
margin: 0;
font-size: 15px;
}
.gu-keys__kind {
color: var(--muted);
font-size: 13px !important;
}
.gu-keys__card h3 {
font-size: 22px;
}
.gu-keys__price {
font-family: var(--serif);
font-size: 24px !important;
color: var(--brick);
}
.gu-keys__slots {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 6px;
}
.gu-keys__slots button {
min-height: 38px;
padding: 0 10px;
font-size: 13px;
}
.gu-keys__book,
.gu-keys__cta {
margin-top: 8px;
min-height: 46px;
border: 0;
border-radius: 999px;
background: var(--brick);
color: #fff;
font-weight: 600;
padding: 0 20px;
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
transition: background 0.2s, transform 0.2s;
}
.gu-keys__book:hover:not(:disabled),
.gu-keys__cta:hover {
background: #9b4322;
transform: translateY(-2px);
}
.gu-keys__book:disabled {
background: var(--paper);
color: var(--muted);
cursor: not-allowed;
}
.gu-keys__booked {
margin-top: 8px !important;
padding: 12px;
border-radius: 10px;
background: #e5efe2;
color: #2f5a2a;
animation: gu-keys-rise 0.4s ease-out both;
}
/* Mortgage sums */
.gu-keys__sums {
margin: 0 clamp(16px, 4cqi, 40px);
padding: 40px clamp(16px, 4cqi, 40px);
background: var(--ink);
color: #eef1f5;
border-radius: 20px;
display: grid;
grid-template-columns: 1.1fr 1fr;
gap: 32px;
align-items: center;
}
.gu-keys__sums h2 {
font-size: clamp(28px, 4.4cqi, 40px);
margin-bottom: 10px;
}
.gu-keys__sums p {
color: #b6c0cd;
margin: 0 0 22px;
}
.gu-keys__sums .gu-keys__range {
color: #b6c0cd;
margin-bottom: 16px;
}
.gu-keys__sums .gu-keys__range b {
color: #fff;
}
.gu-keys__sums .gu-keys__range input::-webkit-slider-runnable-track {
background: linear-gradient(90deg, #e9a47f var(--p), rgb(255 255 255 / 0.15) var(--p));
}
.gu-keys__sums .gu-keys__range input::-moz-range-track {
background: linear-gradient(90deg, #e9a47f var(--p), rgb(255 255 255 / 0.15) var(--p));
}
.gu-keys__sums .gu-keys__beds button {
background: transparent;
border-color: rgb(255 255 255 / 0.25);
}
.gu-keys__sums .gu-keys__beds button[aria-pressed="true"] {
background: #fff;
color: var(--ink);
}
.gu-keys__donutwrap {
display: grid;
grid-template-columns: 200px 1fr;
grid-template-areas: "donut legend";
gap: 20px;
align-items: center;
position: relative;
}
.gu-keys__donut {
grid-area: donut;
width: 200px;
height: 200px;
rotate: -90deg;
}
.gu-keys__donut circle {
fill: none;
stroke-width: 22;
}
.gu-keys__ring-int {
stroke: #e9a47f;
}
.gu-keys__ring-loan {
stroke: #8fb3c9;
stroke-linecap: butt;
}
.gu-keys__monthly {
grid-area: donut;
display: grid;
place-content: center;
text-align: center;
}
.gu-keys__monthly b {
font-family: var(--serif);
font-weight: 500;
font-size: 30px;
font-variant-numeric: tabular-nums;
}
.gu-keys__monthly span {
font-size: 13px;
color: #b6c0cd;
}
.gu-keys__legend {
grid-area: legend;
margin: 0;
display: grid;
gap: 14px;
}
.gu-keys__legend dt {
font-size: 13px;
color: #b6c0cd;
display: flex;
align-items: center;
gap: 8px;
}
.gu-keys__legend dd {
margin: 2px 0 0;
font-family: var(--serif);
font-size: 22px;
font-variant-numeric: tabular-nums;
}
.gu-keys__legend i {
width: 12px;
height: 12px;
border-radius: 3px;
}
.gu-keys__k-loan {
background: #8fb3c9;
}
.gu-keys__k-int {
background: #e9a47f;
}
/* Valuation */
.gu-keys__value {
padding: 64px clamp(16px, 4cqi, 40px);
display: flex;
justify-content: space-between;
align-items: center;
gap: 24px;
flex-wrap: wrap;
}
.gu-keys__value h2 {
font-size: clamp(26px, 4cqi, 38px);
max-width: 22ch;
}
.gu-keys__foot {
display: flex;
gap: 18px;
flex-wrap: wrap;
padding: 20px clamp(16px, 4cqi, 40px);
border-top: 1px solid var(--line);
font-size: 14px;
color: var(--muted);
}
.gu-keys__foot span {
margin-right: auto;
}
@keyframes gu-keys-rise {
from {
opacity: 0;
transform: translateY(14px);
}
to {
opacity: 1;
transform: none;
}
}
@keyframes gu-keys-drop {
from {
transform: translateY(-40px) scale(0.4);
opacity: 0;
}
to {
transform: none;
opacity: 1;
}
}
@keyframes gu-keys-pulse {
from {
transform: scale(0.3);
opacity: 0.45;
}
to {
transform: scale(1.4);
opacity: 0;
}
}
@keyframes gu-keys-flow {
to {
stroke-dashoffset: -40;
}
}
@keyframes gu-keys-card {
from {
opacity: 0;
transform: translateY(10px) scale(0.98);
}
to {
opacity: 1;
transform: none;
}
}
@keyframes gu-keys-zoom {
from {
transform: scale(1.12);
}
to {
transform: none;
}
}
@container (max-width: 760px) {
.gu-keys__hero,
.gu-keys__mapwrap,
.gu-keys__sums {
grid-template-columns: 1fr;
}
.gu-keys__hero {
gap: 14px;
}
.gu-keys__card {
display: grid;
grid-template-columns: 0.9fr 1fr;
}
.gu-keys__cardimg {
aspect-ratio: auto;
min-height: 100%;
}
}
@container (max-width: 560px) {
.gu-keys__bar nav a:not(.gu-keys__navcta) {
display: none;
}
.gu-keys__card {
grid-template-columns: 1fr;
}
.gu-keys__cardimg {
aspect-ratio: 4 / 3;
}
.gu-keys__donutwrap {
grid-template-columns: 1fr;
grid-template-areas: "donut" "legend";
justify-items: center;
}
.gu-keys__legend {
width: 100%;
grid-template-columns: 1fr 1fr;
}
.gu-keys__map {
border-radius: 10px;
}
}
@media (prefers-reduced-motion: reduce) {
.gu-keys *,
.gu-keys *::before,
.gu-keys *::after {
animation: none !important;
transition: none !important;
}
}
```
You might also want
Next piece: Fashion designer portfolio with a lookbook loupeBoutique hotel page with a sun-path day
Landing pages, advanced
Dental clinic landing page with a treatment finder
Landing pages, advanced
Strength gym landing page
Landing pages, intermediate
