A real estate landing page template for 2027 under a golden-hour sky

How our real estate and new homes landing page template works: a hand holding a listing app with room cards flying out, glossy buying steps, a two-card home browser and a mortgage calculator.

7 min read

The real component. Click the picture to open it live and try it before you read how it was built.

Home buyers buy a feeling first. This template opens on a golden-hour sky and a hand holding the builder's listing app, with room cards flying out of the phone.

Content flying out of a phone

The phone's screen position is stored as fractions of the photo, so the app sits exactly on the screen at any size. Each room card has a landing spot and a tilt, and flies out on a spring.

src/registry/landing-pages/plinth/phone-listing.tsx

"use client";

import Image from "next/image";
import { AnimatePresence, motion } from "motion/react";
import { BedDouble, Ruler } from "lucide-react";
import { EASE_OUT } from "@/lib/motion";
import { cn } from "@/lib/utils";
import { useAutoCycle } from "@/hooks/use-auto-cycle";
import { usePrefersReducedMotion } from "@/hooks/use-prefers-reduced-motion";
import { formatPrice } from "./format";
import type { Home, PlinthPhoto, RoomChip } from "./types";

const SWAP_MS = 4200;
// Where the phone's screen sits in the photo of the hand, as fractions of the photo.
const SCREEN = { left: "38.4%", right: "35.6%", top: "2.8%", bottom: "13.2%" };
// Where each room card lands as it flies out of the phone, and how far it tilts.
const CHIP_SPOTS = [
  { className: "top-1/8 -left-2 sm:left-6", rotate: -6 },
  { className: "top-2/5 -right-2 sm:right-4", rotate: 5 },
  { className: "bottom-1/4 left-0 sm:left-12", rotate: 3 },
];

interface PhoneListingProps {
  phone: PlinthPhoto;
  homes: Home[];
  rooms: RoomChip[];
}

// A hand holding a phone whose screen is the listing app, turning through the homes on its own, with frosted room
// cards flying out of the phone and settling around it. For reduced motion it shows the first home, still.
export function PhoneListing({ phone, homes, rooms }: PhoneListingProps) {
  const isStill = usePrefersReducedMotion();
  const [index] = useAutoCycle(homes.length, SWAP_MS, !isStill);
  const home = homes[index];
  return (
    <div className="relative mx-auto w-full max-w-xl">
      <Image
        src={phone.src}
        alt={phone.alt}
        width={1200}
        height={800}
        priority
        sizes="36rem"
        className="relative h-auto w-full mask-b-from-75%"
      />
      <div style={SCREEN} className="absolute flex flex-col overflow-hidden rounded-3xl bg-white font-host">
        <AnimatePresence mode="popLayout" initial={false}>
          <motion.div
            key={home.name}
            initial={{ opacity: 0, x: 24 }}
            animate={{ opacity: 1, x: 0 }}
            exit={{ opacity: 0, x: -24 }}
            transition={{ duration: 0.5, ease: EASE_OUT }}
            className="flex h-full flex-col"
          >
            <div className="relative aspect-4/5 bg-linear-to-b from-sky-200 to-white">
              <Image
                src={home.photo.src}
                alt={home.photo.alt}
                fill
                sizes="12rem"
                className={home.isCutout ? "object-contain object-bottom p-2" : "object-cover"}
              />
            </div>
            <div className="flex flex-1 flex-col gap-1 p-3">
              <p className="text-xs text-sky-700">{home.plot}</p>
              <p className="text-sm font-semibold text-sky-950">{home.name}</p>
              <p className="text-sm font-semibold text-sky-950">{formatPrice(home.price)}</p>
              <p className="mt-auto flex gap-3 text-2xs text-zinc-500">
                <span className="flex items-center gap-1">
                  <BedDouble aria-hidden className="size-3" /> {home.beds} beds
                </span>
                <span className="flex items-center gap-1">
                  <Ruler aria-hidden className="size-3" /> {home.sqft.toLocaleString("en-US")} sq ft
                </span>
              </p>
            </div>
          </motion.div>
        </AnimatePresence>
      </div>
      {rooms.map((room, chip) => (
        <motion.div
          key={room.room}
          aria-hidden
          initial={isStill ? false : { opacity: 0, scale: 0.6, x: 0, y: 40, filter: "blur(8px)" }}
          animate={{ opacity: 1, scale: 1, y: 0, rotate: CHIP_SPOTS[chip].rotate, filter: "blur(0px)" }}
          transition={{ delay: 0.9 + chip * 0.18, duration: 0.8, ease: EASE_OUT }}
          className={cn(
            "absolute rounded-2xl bg-white/70 px-4 py-3 font-host shadow-xl ring-1 shadow-sky-900/10 ring-white backdrop-blur-xl",
            CHIP_SPOTS[chip].className,
          )}
        >
          <p className="text-sm font-semibold text-sky-950">{room.room}</p>
          <p className="text-xs text-sky-800/80">{room.size}</p>
        </motion.div>
      ))}
    </div>
  );
}
The phone and its flying cards

Buying in three objects

Buying is three soft sky cards, each holding one glossy object (the glass house, a signed deed, the keys) over a huge faint marker of when it happens.

A mortgage calculator that feels like a plan

The mortgage section works out the fixed monthly repayment from the rate and term, with a real switch between two options, styled like a premium pricing plan rather than a form.

src/registry/landing-pages/plinth/mortgage-calculator.tsx

"use client";

import { useId, useState } from "react";
import { Check } from "lucide-react";
import { cn } from "@/lib/utils";
import { formatPrice } from "./format";
import type { PlinthContent } from "./types";

const PRICE_STEP = 5000;
const MIN_DEPOSIT = 5;
const MAX_DEPOSIT = 40;
const MONTHS_PER_YEAR = 12;
const PERCENT = 100;

// The fixed monthly repayment on a loan, from the annual rate and term.
function monthlyPayment(loan: number, ratePercent: number, years: number): number {
  const rate = ratePercent / PERCENT / MONTHS_PER_YEAR;
  return (loan * rate) / (1 - (1 + rate) ** -(years * MONTHS_PER_YEAR));
}

function Slider({
  label,
  value,
  shown,
  min,
  max,
  step,
  onChange,
}: {
  label: string;
  value: number;
  shown: string;
  min: number;
  max: number;
  step: number;
  onChange: (value: number) => void;
}) {
  const id = useId();
  return (
    <div className="flex flex-col gap-3">
      <label htmlFor={id} className="flex justify-between font-host text-sm text-zinc-600">
        {label}
        <span className="font-semibold text-sky-950">{shown}</span>
      </label>
      <input
        id={id}
        type="range"
        min={min}
        max={max}
        step={step}
        value={value}
        onChange={(event) => onChange(Number(event.target.value))}
        className="w-full accent-sky-700"
      />
    </div>
  );
}

// The mortgage as a premium plan: a serif heading with its accent words in sky blue, a real switch between the two
// terms, two sliders, and the monthly figure on a tinted glass card with a tab on top, then a line of reassurances.
export function MortgageCalculator({ mortgage }: { mortgage: PlinthContent["mortgage"] }) {
  const [price, setPrice] = useState(Math.round((mortgage.minPrice + mortgage.maxPrice) / 2 / PRICE_STEP) * PRICE_STEP);
  const [deposit, setDeposit] = useState(10);
  const [isLong, setIsLong] = useState(true);
  const [shortTerm, longTerm] = mortgage.terms;
  const years = isLong ? longTerm : shortTerm;
  const loan = price * (1 - deposit / PERCENT);
  const monthly = monthlyPayment(loan, mortgage.ratePercent, years);

  return (
    <div className="mx-auto max-w-5xl px-5 pt-28 text-center sm:pt-36 lg:px-8">
      <h2
        id="mortgage-title"
        className="font-serif text-5xl leading-none font-normal tracking-normal text-balance text-sky-950 sm:text-6xl"
      >
        {mortgage.title} <span className="text-sky-600 italic">{mortgage.accent}</span>
      </h2>
      <p className="mx-auto mt-5 max-w-lg font-host text-pretty text-zinc-600">{mortgage.subtitle}</p>
      <div className="mt-8 flex items-center justify-center gap-4 font-host text-sm">
        <span className={cn(!isLong ? "text-sky-950" : "text-zinc-400")}>{shortTerm} years</span>
        <button
          type="button"
          role="switch"
          aria-checked={isLong}
          aria-label="Longer term"
          onClick={() => setIsLong(!isLong)}
          className="flex h-7 w-13 rounded-full bg-sky-600 p-1 outline-none focus-visible:ring-3 focus-visible:ring-sky-300"
        >
          <span
            className={cn(
              "size-5 rounded-full bg-white shadow transition-transform duration-300",
              isLong && "translate-x-6",
            )}
          />
        </button>
        <span className={cn(isLong ? "text-sky-950" : "text-zinc-400")}>{longTerm} years</span>
      </div>
      <div className="mt-12 grid gap-6 text-left md:grid-cols-2">
        <div className="flex flex-col justify-center gap-8 rounded-3xl bg-white p-8 ring-1 ring-zinc-200">
          <Slider
            label="Home price"
            value={price}
            shown={formatPrice(price)}
            min={mortgage.minPrice}
            max={mortgage.maxPrice}
            step={PRICE_STEP}
            onChange={setPrice}
          />
          <Slider
            label="Deposit"
            value={deposit}
            shown={`${deposit}% ยท ${formatPrice(price - loan)}`}
            min={MIN_DEPOSIT}
            max={MAX_DEPOSIT}
            step={1}
            onChange={setDeposit}
          />
        </div>
        <div className="relative rounded-3xl bg-linear-to-b from-sky-100 to-sky-50 p-8 ring-1 ring-sky-200">
          <span className="absolute -top-3 left-8 rounded-md bg-sky-600 px-2.5 py-1 font-host text-xs font-medium text-white">
            {years}-year fixed
          </span>
          <p className="font-host text-sm text-sky-900/70">Estimated monthly repayment</p>
          <p aria-live="polite" className="mt-2 font-serif text-6xl text-sky-950 tabular-nums">
            {formatPrice(monthly)}
          </p>
          <p className="mt-6 flex justify-between border-t border-sky-200 pt-4 font-host text-sm text-sky-900/80">
            <span>Loan {formatPrice(loan)}</span>
            <span>Deposit {formatPrice(price - loan)}</span>
          </p>
          <p className="mt-3 font-host text-xs text-sky-900/60">{mortgage.note}</p>
        </div>
      </div>
      <ul className="mt-8 flex flex-wrap justify-center gap-x-8 gap-y-2 font-host text-sm text-zinc-500">
        {mortgage.trust.map((item) => (
          <li key={item} className="flex items-center gap-1.5">
            <Check aria-hidden className="size-4 text-sky-600" /> {item}
          </li>
        ))}
      </ul>
    </div>
  );
}
The calculator

More articles