Photo Overlay Type Hero 1
Photo overlay type hero: the promise set huge across a full-bleed lifestyle photo (one line knocked out so the photo shows through),
Use it in a prompt
Use hero/photo-overlay-type-hero from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/hero/photo-overlay-type-hero.tsx. - Import it and pass your copy and images (Props tab):
import { PhotoOverlayTypeHero } from "@/components/funneldna/hero/photo-overlay-type-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/photo-overlay-type-hero/component.tsx 268 lines
// layout: bento-grid
// Photo overlay type hero: the promise set huge across a full-bleed lifestyle photo (one line knocked out so the photo shows through),
// with a solid colour-blocked bar of unequal tiles under it carrying the subhead, the numbered reasons and the one action.
import * as React from "react";
import { ShieldCheck, Star } from "lucide-react";
import { motion, useReducedMotion, useScroll, useTransform } from "motion/react";
export type PhotoOverlayTypeHeroLine = {
text: React.ReactNode;
// Knock the line out: transparent letters with an outline, so the photo shows through.
outline?: boolean;
};
export type PhotoOverlayTypeHeroProps = {
// The headline, two or three short lines.
lines?: PhotoOverlayTypeHeroLine[];
subhead?: React.ReactNode;
// Small proof line under the subhead; renders nothing when empty.
proof?: React.ReactNode;
// Heading over the numbered reasons tile.
reasonsTitle?: React.ReactNode;
// Short numbered reasons; the tile is hidden when empty.
reasons?: React.ReactNode[];
// Price shown with a superscript currency sign, e.g. "$47"; hidden when empty.
price?: string;
priceNote?: React.ReactNode;
// Plain instruction that ends the copy, right above the button.
instruction?: React.ReactNode;
label?: React.ReactNode;
reassurance?: React.ReactNode;
// scene slot: the lifestyle photo behind the headline. Without it the stage becomes two flat band blocks.
sceneImage?: string;
sceneAlt?: string;
// object-position of the photo on wide screens and on phones (crop to the subject).
focus?: string;
phoneFocus?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
disabled?: boolean;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_LINES: PhotoOverlayTypeHeroLine[] = [
{ text: "Get the result" },
{ text: "you came for,", outline: true },
{ text: "starting today." },
];
export function PhotoOverlayTypeHero({
lines = DEFAULT_LINES,
subhead = "One clear offer and one simple step. Everything you need is ready the moment you order.",
proof,
reasonsTitle,
reasons = [],
price,
priceNote,
instruction = "Click the button below to get instant access.",
label = "Order now",
reassurance = "Secure checkout",
sceneImage,
sceneAlt = "",
focus = "68% 50%",
phoneFocus = "70% 50%",
href,
onAction,
disabled = false,
state = "default",
className,
}: PhotoOverlayTypeHeroProps) {
const ref = React.useRef<HTMLElement>(null);
const reduce = useReducedMotion();
const { scrollYProgress } = useScroll({ target: ref, offset: ["start start", "end start"] });
const y = useTransform(scrollYProgress, [0, 1], ["0%", "9%"]);
const isDisabled = disabled || state === "disabled";
const hasReasons = reasons.length > 0;
const money = price ? splitPrice(price) : null;
const btnClass = "cf-pot__btn" + (state === "hover" ? " is-hover" : "") + (state === "active" ? " is-active" : "");
const button =
href && !isDisabled ? (
<a className={btnClass} href={href} onClick={onAction}>
{label}
</a>
) : (
<button type="button" className={btnClass} disabled={isDisabled} onClick={onAction}>
{label}
</button>
);
const rootStyle = { "--pot-focus": focus, "--pot-focus-phone": phoneFocus } as React.CSSProperties;
return (
<section
ref={ref}
className={["cf-pot", hasReasons ? "" : "cf-pot--solo", className].filter(Boolean).join(" ")}
style={rootStyle}
>
<style>{CSS}</style>
<div className="cf-pot__stage">
{sceneImage ? (
<>
<motion.div className="cf-pot__media" style={reduce ? undefined : { y }}>
<img src={sceneImage} alt={sceneAlt} decoding="async" fetchPriority="high" />
</motion.div>
<div className="cf-pot__scrim" aria-hidden="true" />
</>
) : (
<div className="cf-pot__blocks" aria-hidden="true" />
)}
<h1 className="cf-pot__h1">
{lines.map((line, i) => (
<React.Fragment key={i}>
{i > 0 ? " " : null}
<span
className={"cf-pot__line" + (line.outline ? " is-outline" : "")}
style={{ "--i": i } as React.CSSProperties}
>
{line.text}
</span>
</React.Fragment>
))}
</h1>
</div>
<div className="cf-pot__bar">
{subhead || proof ? (
<div className="cf-pot__lead">
{subhead ? <p className="cf-pot__sub">{subhead}</p> : null}
{proof ? (
<p className="cf-pot__proof">
<Star size={16} strokeWidth={2.5} fill="currentColor" aria-hidden="true" />
{proof}
</p>
) : null}
</div>
) : null}
{hasReasons ? (
<div className="cf-pot__reasons">
{reasonsTitle ? <h2 className="cf-pot__rtitle">{reasonsTitle}</h2> : null}
<ol className="cf-pot__rlist">
{reasons.map((reason, i) => (
<li className="cf-pot__ritem" key={i}>
<span className="cf-pot__rnum" aria-hidden="true">
{i + 1}
</span>
<span className="cf-pot__rtext">{reason}</span>
</li>
))}
</ol>
</div>
) : null}
<div className="cf-pot__act">
{money || instruction ? (
<div className="cf-pot__offer">
{money ? (
<p className="cf-pot__price">
<span className="cf-pot__fig">
{money.cur ? <span className="cf-pot__cur">{money.cur}</span> : null}
{money.amount}
</span>
{priceNote ? <span className="cf-pot__pnote">{priceNote}</span> : null}
</p>
) : null}
{instruction ? <p className="cf-pot__instr">{instruction}</p> : null}
</div>
) : null}
{button}
{reassurance ? (
<p className="cf-pot__reas">
<ShieldCheck size={16} strokeWidth={2.5} aria-hidden="true" />
{reassurance}
</p>
) : null}
</div>
</div>
</section>
);
}
export default PhotoOverlayTypeHero;
function splitPrice(price: string) {
const i = price.search(/[0-9]/);
if (i <= 0) return { cur: "", amount: price };
return { cur: price.slice(0, i).trim(), amount: price.slice(i) };
}
const CSS = `
.cf-pot{position:relative;isolation:isolate;display:flex;flex-direction:column;overflow:hidden;container:pot / inline-size;background:var(--band);color:var(--band-ink);font-family:var(--font-body);--pot-gutter:clamp(16px,5vw,48px)}
@media (min-width:760px){.cf-pot{min-block-size:clamp(560px,100svh,960px)}}
.cf-pot *,.cf-pot *::before,.cf-pot *::after{box-sizing:border-box}
.cf-pot__stage,.cf-pot__bar{--pot-edge:max(var(--pot-gutter),calc((100cqi - 1200px) / 2));--pot-lift:clamp(16px,2.5cqi,36px);--pot-cut:clamp(32px,4cqi,64px)}
.cf-pot__stage{position:relative;isolation:isolate;flex:1 1 auto;display:flex;flex-direction:column;justify-content:flex-end;min-width:0;min-block-size:clamp(340px,54svh,620px);padding-block:clamp(88px,14cqi,176px) 28px;overflow:hidden}
@container pot (min-width:760px){.cf-pot__stage{padding-block-end:calc(var(--pot-lift) + clamp(20px,2.5cqi,32px))}}
.cf-pot__media{position:absolute;inset:-12% 0;z-index:-2;will-change:transform}
.cf-pot__media img{display:block;inline-size:100%;block-size:100%;object-fit:cover;object-position:var(--pot-focus,68% 50%)}
.cf-pot__scrim{position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,oklch(from var(--band) l c h / .55) 0%,oklch(from var(--band) l c h / 0) 72%),linear-gradient(180deg,oklch(from var(--band) l c h / .28) 0%,oklch(from var(--band) l c h / .5) 38%,oklch(from var(--band) l c h / .92) 100%)}
.cf-pot__blocks{position:absolute;inset:0;z-index:-2;background:var(--band)}
.cf-pot__blocks::after{content:"";position:absolute;inset:0;background:oklch(from var(--band) calc(l + .07) c h);clip-path:polygon(58% 0,100% 0,100% 100%,38% 100%)}
@container pot (max-width:759px){
.cf-pot__media img{object-position:var(--pot-focus-phone,70% 50%)}
.cf-pot__scrim{background:linear-gradient(180deg,oklch(from var(--band) l c h / .3) 0%,oklch(from var(--band) l c h / .62) 40%,oklch(from var(--band) l c h / .94) 100%)}
.cf-pot__blocks::after{clip-path:polygon(70% 0,100% 0,100% 100%,30% 100%)}
}
.cf-pot__h1{margin:0;min-width:0;padding-inline:var(--pot-edge);font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2.5rem,8.4cqi,7.5rem);line-height:1;color:var(--band-ink);overflow-wrap:anywhere;hyphens:auto;hyphenate-limit-chars:10 4 4;text-wrap:balance}
.cf-pot__line{display:block;text-wrap:balance;text-shadow:0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3);animation:cf-pot-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
.cf-pot__line.is-outline{color:transparent;-webkit-text-stroke:clamp(1.75px,.22cqi,3px) var(--band-ink);paint-order:stroke fill;text-shadow:none}
@supports not (-webkit-text-stroke:1px black){.cf-pot__line.is-outline{color:var(--band-ink)}}
@keyframes cf-pot-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-pot__bar{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"lead" "act" "reasons";background:var(--band);color:var(--band-ink)}
.cf-pot--solo .cf-pot__bar{grid-template-areas:"lead" "act"}
.cf-pot__lead{grid-area:lead;min-width:0;padding:24px var(--pot-edge)}
.cf-pot__sub{margin:0;max-inline-size:42ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-pot__proof{margin:16px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-pot__proof svg,.cf-pot__reas svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-pot__reasons{grid-area:reasons;min-width:0;padding:28px var(--pot-edge) 36px}
.cf-pot__rtitle{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance}
.cf-pot__rlist{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.cf-pot__ritem{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;align-items:baseline;min-width:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4}
.cf-pot__rnum{font-family:var(--font-display);font-weight:800;font-variant-numeric:tabular-nums;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;min-inline-size:1ch}
.cf-pot__rtext{min-width:0;text-wrap:pretty}
.cf-pot__act{grid-area:act;position:relative;isolation:isolate;min-width:0;background:var(--card,var(--surface));color:var(--ink);padding:52px var(--pot-edge) 32px;clip-path:polygon(0 12px,100% 0,100% 100%,0 100%)}
.cf-pot__act::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:var(--accent-fill,var(--accent));clip-path:polygon(0 12px,100% 0,100% 10px,0 22px)}
.cf-pot__offer{display:flex;flex-wrap:wrap;align-items:center;gap:16px 28px;margin-block-end:24px}
.cf-pot__price{margin:0;flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-start;gap:14px;color:var(--ink)}
.cf-pot__fig{display:block;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink)}
.cf-pot__cur{display:inline-block;vertical-align:top;margin-block-start:.1em;margin-inline-end:.06em;font-size:.45em;letter-spacing:0}
.cf-pot__pnote{display:block;margin:0;font-size:.9375rem;line-height:1.3;font-weight:600;color:var(--muted)}
.cf-pot__instr{margin:0;flex:1 1 11rem;min-width:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4;font-weight:600;color:var(--ink);text-wrap:pretty}
.cf-pot__reas{margin:12px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-pot__btn{--pot-bg:var(--button-bg,var(--cta));--pot-bg2:var(--button-bg-2,var(--cta-2));appearance:none;border:0;margin:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;inline-size:100%;min-block-size:72px;padding:0 28px;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;color:var(--button-ink,var(--cta-ink));text-decoration:none;text-align:center;text-wrap:balance;text-shadow:var(--button-text-shadow,none);cursor:pointer;background:linear-gradient(oklch(from var(--pot-bg) calc(l + .04) c h),oklch(from var(--pot-bg2) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pot-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--pot-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3),0 8px 16px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .4));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-pot__btn:hover:not(:disabled),.cf-pot__btn.is-hover:not(:disabled){transform:translateY(-1px);background:linear-gradient(oklch(from var(--pot-bg) calc(l - .01) c h),oklch(from var(--pot-bg2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--pot-bg) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--pot-bg) calc(l - .2) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .34),0 10px 18px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .5)}
.cf-pot__btn:active:not(:disabled),.cf-pot__btn.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--pot-bg) calc(l - .06) c h),oklch(from var(--pot-bg2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--pot-bg) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--pot-bg) calc(l - .2) c h),0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3)}
.cf-pot__btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-pot__btn:disabled{cursor:not-allowed;transform:none;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
@container pot (min-width:760px){
.cf-pot__bar{padding-inline-start:var(--pot-edge);grid-template-columns:minmax(0,1fr) minmax(0,1fr) var(--pot-edge);grid-template-areas:"lead act act" "reasons act act"}
.cf-pot--solo .cf-pot__bar{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) var(--pot-edge);grid-template-areas:"lead act act"}
.cf-pot__lead{align-self:start;padding:clamp(28px,3cqi,40px) 32px 12px 0}
.cf-pot--solo .cf-pot__lead{padding-block-end:clamp(28px,3cqi,40px)}
.cf-pot__reasons{padding:12px 32px clamp(28px,3cqi,40px) 0}
.cf-pot__act{display:flex;flex-direction:column;justify-content:center;margin-block-start:calc(-1 * var(--pot-lift));padding:clamp(32px,3.4cqi,48px) var(--pot-edge) clamp(32px,3.4cqi,48px) calc(var(--pot-cut) + 38px);clip-path:polygon(var(--pot-cut) 0,100% 0,100% 100%,0 100%)}
.cf-pot__act::before{clip-path:polygon(var(--pot-cut) 0,calc(var(--pot-cut) + 14px) 0,14px 100%,0 100%)}
}
@container pot (min-width:1024px){
.cf-pot__bar{grid-template-columns:minmax(0,1fr) minmax(0,.9fr) minmax(0,1.35fr) var(--pot-edge);grid-template-areas:"lead reasons act act"}
.cf-pot--solo .cf-pot__bar{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) var(--pot-edge);grid-template-areas:"lead act act"}
.cf-pot__lead,.cf-pot--solo .cf-pot__lead{padding:clamp(28px,3cqi,40px) 40px clamp(28px,3cqi,40px) 0}
.cf-pot__reasons{align-self:start;padding:clamp(28px,3cqi,40px) 32px clamp(28px,3cqi,40px) 0}
}
@media (prefers-reduced-motion:reduce){
.cf-pot__line{animation:none}
.cf-pot__btn{transition:none}
.cf-pot__btn:hover:not(:disabled),.cf-pot__btn.is-hover:not(:disabled),.cf-pot__btn:active:not(:disabled),.cf-pot__btn.is-active:not(:disabled){transform:none}
}
`;
pieces/hero/photo-overlay-type-hero/specimen.tsx 42 lines
import __studioImageb8ea3760 from "../assets/fd72d91b9f0dd8b3.webp";
import PhotoOverlayTypeHero from "../photo-overlay-type-hero";
import { slot } from "../../slots";
import defaults from "../../studio-defaults.json";
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = "default" | "hover" | "active" | "disabled";
export default function PhotoOverlayTypeHeroSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<PhotoOverlayTypeHero
state={state}
lines={[
{ text: "Flowers that last" },
{ text: "the whole", outline: true },
{ text: "week." },
]}
subhead="Hand-tied bouquets, cut the morning they ship and packed in water, so your table still looks fresh next weekend."
proof="4.9 average from 1,180 Stem & Sill bouquet reviews"
reasonsTitle="Three reasons they last seven days"
reasons={[
"Cut at dawn and delivered the same day",
"Every stem travels in its own water pouch",
"Flower food and a care card in each box",
]}
price={defaults.sample.price}
priceNote="one-time payment"
instruction="Click the button below to pick your delivery day."
label="Order now"
reassurance="Secure checkout · Choose any delivery day"
sceneImage={slot(
"scene",
__studioImageb8ea3760
)}
sceneAlt="A hand-tied bouquet of peonies and garden roses in a glass vase on a sunny kitchen windowsill"
focus="70% 55%"
phoneFocus="74% 50%"
href="#order"
/>
);
}
| Name | Type | Details |
|---|---|---|
lines OptionalPhotoOverlayTypeHero |
PhotoOverlayTypeHeroLine[] |
Default DEFAULT_LINES
|
subhead OptionalPhotoOverlayTypeHero |
React.ReactNode |
Default "One clear offer and one simple step. Everything you need is ready the moment you order."
|
proof OptionalPhotoOverlayTypeHero |
React.ReactNode |
|
reasonsTitle OptionalPhotoOverlayTypeHero |
React.ReactNode |
|
reasons OptionalPhotoOverlayTypeHero |
React.ReactNode[] |
Default []
|
price OptionalPhotoOverlayTypeHero |
string |
|
priceNote OptionalPhotoOverlayTypeHero |
React.ReactNode |
|
instruction OptionalPhotoOverlayTypeHero |
React.ReactNode |
Default "Click the button below to get instant access."
|
label OptionalPhotoOverlayTypeHero |
React.ReactNode |
Default "Order now"
|
reassurance OptionalPhotoOverlayTypeHero |
React.ReactNode |
Default "Secure checkout"
|
sceneImage OptionalPhotoOverlayTypeHero |
string |
|
sceneAlt OptionalPhotoOverlayTypeHero |
string |
Default ""
|
focus OptionalPhotoOverlayTypeHero |
string |
Default "68% 50%"
|
phoneFocus OptionalPhotoOverlayTypeHero |
string |
Default "70% 50%"
|
href OptionalPhotoOverlayTypeHero |
string |
|
onAction OptionalPhotoOverlayTypeHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalPhotoOverlayTypeHero |
boolean |
Default false
|
state OptionalPhotoOverlayTypeHero |
"default" | "hover" | "active" | "disabled" |
Default "default"
|
className OptionalPhotoOverlayTypeHero |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-shadow- Secondary button.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
fd72d91b9f0dd8b3.webp
image/webp · 70.7 KB