Hero Split 1
Pairs the promise and decision card with a full-height product image on the same screen.
Use it in a prompt
Use kit/hero-split 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/kit/hero-split.tsx. - Import it and pass your copy and images (Props tab):
import { HeroSplit } from "@/components/funneldna/kit/hero-split"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/kit/hero-split/component.tsx 92 lines
// pages: all
// Pairs the promise and decision card with a full-height product image on the same screen.
import type { ReactNode, CSSProperties } from "react";
import { Eyebrow, keepHyphensIn } from "./core";
export type HeroSplitProps = {
prehead?: ReactNode;
title?: ReactNode;
lead?: ReactNode;
/** Decision card or action control, which owns its navigation or callback. */
action: ReactNode;
/** Product slot; takes precedence over the legacy image, including an empty string. */
productImage?: string;
/** Legacy image URL or rich image/frame content. */
image?: ReactNode;
imageAlt?: string;
/** Plain line under the photo. */
caption?: ReactNode;
/** CSS object-position for the image within the portrait frame. */
imagePosition?: string;
className?: string;
};
export function HeroSplit({
prehead, title = <>Explore the <HeroMark>Funnel Starter Kit</HeroMark></>, lead, action,
productImage, image, imageAlt = "", caption, imagePosition = "center", className,
}: HeroSplitProps) {
const media = productImage !== undefined ? productImage : image;
const picture = typeof media === "string" ? <img src={media} alt={imageAlt} decoding="async" /> : media;
return (
<div data-hero="split" className={["cf-hero-split grid gap-8 lg:grid-cols-[minmax(0,1.15fr)_minmax(0,1fr)] lg:items-stretch lg:gap-16", className].filter(Boolean).join(" ")}>
<style>{HERO_SPLIT_CSS}</style>
<div className="flex flex-col items-start gap-6 text-left [--heading-align:start] lg:justify-center">
<div className="flex flex-col items-start gap-6">
<div className="flex flex-col items-start gap-5">
{prehead && <Eyebrow>{prehead}</Eyebrow>}
<h1 className=" text-[length:var(--fs-h1,clamp(2.125rem,4.4vw,3.75rem))] [font-weight:var(--display-weight,700)] [text-wrap:balance]">{title}</h1>
</div>
{lead && <p className="max-w-[48ch] text-[length:var(--fs-lead,1.125rem)] font-medium leading-relaxed text-[var(--muted)] [text-wrap:pretty] md:text-[length:var(--fs-lead,1.25rem)]">{keepHyphensIn(lead)}</p>}
</div>
{/* Priority keeps supplied action cards flush with the column, including their own margin/width rules. */}
<div className="w-full max-w-[560px] [&>*]:!mx-0 [&>*]:!max-w-full">{action}</div>
</div>
<figure className="m-0 flex flex-col gap-3">
<div className="relative aspect-[4/5] overflow-hidden rounded-[var(--card-radius,var(--radius,20px))] bg-[var(--card)] shadow-[var(--card-shadow,var(--shadow-md,0_1px_2px_oklch(0.22_0.03_260_/_0.22),0_4px_10px_-2px_oklch(0.22_0.03_260_/_0.2)))] ring-1 ring-inset ring-[var(--card-border,oklch(from_var(--ink)_l_c_h_/_0.12))] lg:aspect-auto lg:min-h-[480px] lg:flex-1" style={{ "--hero-image-position": imagePosition } as CSSProperties}>
<div className="absolute inset-0 [&>*]:h-full [&>*]:w-full [&>img]:block [&>img]:object-cover [&>img]:[object-position:var(--hero-image-position)]">{picture}</div>
</div>
{caption && (
<figcaption className="hs-caption text-center text-[15px] font-medium leading-snug text-[var(--muted)] [text-wrap:balance] sm:text-base">{caption}</figcaption>
)}
</figure>
</div>
);
}
export default HeroSplit;
/**
* Marker-highlighter stroke for one continuous key phrase in the HeroSplit headline. One smooth translucent stroke
* sitting low on the letters, uneven ends, wraps cleanly across lines. Colour via --marker (defaults to highlighter yellow).
*/
// private
export function HeroMark({ children }: { children: ReactNode }) {
return <span className="hs-mark">{children}</span>;
}
// Photographic artwork retains its colours; paint derives from theme tokens.
const HERO_SPLIT_CSS = `
.cf-hero-split{font-family:var(--font-body);color:var(--ink)}
.cf-hero-split h1{margin:0;line-height:var(--display-leading,1.08);font-family:var(--font-display);letter-spacing:var(--display-tracking,-.01em);text-transform:var(--display-case,none)}
.cf-hero-split .hs-mark{
color: inherit;
font-style: normal;
padding: 0 .14em;
margin: 0 -.06em;
background-image:linear-gradient(var(--marker,#fae37c),var(--marker,#fae37c));
background-repeat: no-repeat;
background-size:100% .7em;
background-position:0 80%;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
border-radius: .12em .3em .18em .34em;
animation: hs-mark-in .9s cubic-bezier(.22,.8,.3,1) .25s both;
}
@keyframes hs-mark-in{
from{ background-size: 0% .7em; }
to{ background-size: 100% .7em; }
}
@media (prefers-reduced-motion: reduce){
.cf-hero-split .hs-mark{ animation: none; }
}
`;
pieces/kit/hero-split/specimen.tsx 24 lines
import { HeroSplit, HeroMark } from "../hero-split";
import { Section } from "../core";
import { CtaCard } from "../cta-card";
import { CtaButton } from "../cta-button";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import __studioImagedfb82289 from "../assets/26344bf0efb9bf4b.webp";
// Specimen for hero-split.tsx. Fictional Funnel Starter Kit; proof remains unsupplied.
import { Lock } from "lucide-react";
export const states = ["default"];
export default function Page() {
return <>
<Section ><HeroSplit
prehead="For creators building their first funnel"
title={<>Explore the <HeroMark>Funnel Starter Kit</HeroMark></>}
lead="Plan your offer, write your page copy, and check the path before you launch."
action={<CtaCard name={defaults.sample.name} price={defaults.sample.price} priceNote="One payment. Instant download. Recorded lessons + page copy workbook." button={<CtaButton label={defaults.sample.label} sub="Secure checkout · Instant download" />} icon={<Lock aria-hidden />} reassure="Refund terms: 30-day money-back guarantee." />}
productImage={slot("product", __studioImagedfb82289)}
imageAlt="The Funnel Starter Kit guide standing on a desk with its workbook and launch checklist fanned behind it"
caption="The guide, workbook and checklist in one instant download."
/></Section>
</>;
}
| Name | Type | Details |
|---|---|---|
prehead OptionalHeroSplit |
ReactNode |
|
title OptionalHeroSplit |
ReactNode |
Default <>Explore the <HeroMark>Funnel Starter Kit</HeroMark></>
|
lead OptionalHeroSplit |
ReactNode |
|
action RequiredHeroSplit |
ReactNode |
|
productImage OptionalHeroSplit |
string |
|
image OptionalHeroSplit |
ReactNode |
|
imageAlt OptionalHeroSplit |
string |
Default ""
|
caption OptionalHeroSplit |
ReactNode |
|
imagePosition OptionalHeroSplit |
string |
Default "center"
|
className OptionalHeroSplit |
string |
|
children RequiredHeroMark |
ReactNode |
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.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-leading--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
26344bf0efb9bf4b.webp
image/webp · 87.6 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
c5c36baf6b897f22.svg image/svg+xml · 236 Bytes
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB