Hero Ticket 1
Pairs the invitation and capture form with an illustrative scene that supports the promise.
Use it in a prompt
Use kit/hero-ticket 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-ticket.tsx. - Import it and pass your copy and images (Props tab):
import { HeroTicket } from "@/components/funneldna/kit/hero-ticket"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/kit/hero-ticket/component.tsx 97 lines
// pages: all
// Pairs the invitation and capture form with an illustrative scene that supports the promise.
import type { ReactNode, CSSProperties } from "react";
import { heroH1, heroLead, keepHyphensIn } from "./core";
export type HeroTicketProps = {
/** Legacy props remain accepted but are not rendered. */
prehead?: ReactNode;
stub?: ReactNode;
title?: ReactNode;
lead?: ReactNode;
/** Form or action control, which owns its validation, navigation and callbacks. */
action: ReactNode;
/** Scene slot; takes precedence over both legacy image props, including an empty string. */
sceneImage?: string;
/** Legacy image content, used when no URL is supplied. */
image?: ReactNode;
/** Legacy scene URL. */
imageSrc?: string;
imageAlt?: string;
/** Plain line under the photo. */
caption?: ReactNode;
/** CSS object-position within the full-height photo frame. */
imagePosition?: string;
className?: string;
};
export function HeroTicket({
title = <>Map Out Your First Funnel <span className="ht-hl">Before You Build a Page</span></>,
lead, action, sceneImage, image, imageSrc, imageAlt = "", caption, imagePosition = "center", className,
}: HeroTicketProps) {
const source = sceneImage !== undefined ? sceneImage : imageSrc;
const media = source ? <img src={source} alt={imageAlt} loading="eager" decoding="async" /> : sceneImage === undefined ? image : null;
return (
<div data-hero="ticket" className={["cf-hero-ticket grid gap-10 lg:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)] lg:items-stretch lg:gap-16", className].filter(Boolean).join(" ")}>
<style>{HERO_TICKET_CSS}</style>
<div className="ht-photo order-last lg:order-first">
<div className="ht-frame">
<div className="ht-media" style={{ "--hero-image-position": imagePosition } as CSSProperties}>{media}</div>
</div>
{caption && <p className="ht-caption">{caption}</p>}
</div>
<div className="ht-copy flex min-w-0 flex-col justify-center gap-8 text-left [--heading-align:start] lg:py-4">
<div className="flex flex-col items-start gap-5">
<h1 className={heroH1("ht-title ht-rise")}>{title}</h1>
{lead && <p className={heroLead + " ht-lead ht-rise max-w-[54ch]"} style={{ "--ht-i": 1 } as CSSProperties}>{keepHyphensIn(lead)}</p>}
</div>
<div className="ht-card ht-rise" style={{ "--ht-i": 2 } as CSSProperties}>{action}</div>
</div>
</div>
);
}
export default HeroTicket;
// Priority resets supplied forms/cards, including their inline or important surface and spacing styles.
const HERO_TICKET_CSS = `
.cf-hero-ticket{--ht-mark:var(--marker,#fae37c);--ht-bg:var(--button-bg,var(--cta));--ht-bg2:var(--button-bg-2,var(--cta-2));--ht-shadow:var(--shadow,oklch(0.22 0.03 260));font-family:var(--font-body);color:var(--ink)}
.cf-hero-ticket .ht-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);line-height:1.04;text-wrap:balance}
.cf-hero-ticket .ht-title .ht-hl{color:inherit;padding:0 .1em;margin:0 -.1em;border-radius:.22em .4em .3em .45em;-webkit-box-decoration-break:clone;box-decoration-break:clone;background-image:linear-gradient(var(--ht-mark),var(--ht-mark));background-repeat:no-repeat;background-position:0 86%;background-size:100% .62em;animation:ht-swipe .8s cubic-bezier(.2,.7,.2,1) .25s both}
.cf-hero-ticket .ht-title+p,.cf-hero-ticket [data-form-note],.cf-hero-ticket [role=status] p,.cf-hero-ticket label span{color:var(--muted)}
.cf-hero-ticket .ht-lead{font-weight:500;text-wrap:pretty}
.cf-hero-ticket [role=alert]{color:var(--danger)}
.cf-hero-ticket [role=status]>span{background:var(--success-soft);color:var(--success)}
.cf-hero-ticket .ht-photo{position:relative;margin:0;min-width:0}
.cf-hero-ticket .ht-frame{position:relative;overflow:hidden;aspect-ratio:4/3;border-radius:var(--radius,12px);background:color-mix(in oklch,var(--ink) 6%,var(--surface))}
.cf-hero-ticket .ht-media{position:absolute;inset:0;transform-origin:50% 35%;animation:ht-settle 1.4s cubic-bezier(.2,.7,.2,1) both}
.cf-hero-ticket .ht-media>*{display:block;width:100%;height:100%}
.cf-hero-ticket .ht-media img{object-fit:cover;object-position:var(--hero-image-position,center)}
.cf-hero-ticket .ht-caption{margin:12px 0 0;color:var(--muted);font-family:var(--font-body);font-size:15px;font-weight:600;line-height:1.4;text-align:center;text-wrap:balance}
.cf-hero-ticket .ht-card{position:relative;width:100%;max-width:560px;padding:clamp(20px,3vw,32px);border-radius:var(--card-radius,var(--radius,14px));background:var(--card,#fff);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--ht-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--ht-shadow) l c h / .32)))}
.cf-hero-ticket .ht-card>*{position:relative;margin-left:0!important;margin-right:0!important}
.cf-hero-ticket .ht-card>[data-optin],.cf-hero-ticket .ht-card>[data-cta-card]{border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important}
.cf-hero-ticket .ht-card label{font-size:17px;font-weight:800;line-height:1.3;color:var(--label-ink,var(--ink));letter-spacing:-.005em}
.cf-hero-ticket .ht-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]){min-height:60px;padding-inline:18px;font-family:var(--font-body);font-size:18px;font-weight:600;color:var(--field-ink,#101828);background:var(--field,#fff);border:2px solid var(--field-border,oklch(from var(--ink) l c h / .22));border-radius:var(--field-radius,var(--radius,12px));transition:border-color .16s ease,box-shadow .16s ease}
.cf-hero-ticket .ht-card input::placeholder{font-weight:500;color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-hero-ticket .ht-card input:not([type=checkbox]):not([type=radio]):hover{border-color:color-mix(in oklch,var(--field-ink) 38%,var(--field))}
.cf-hero-ticket .ht-card input:not([type=checkbox]):not([type=radio]):focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-hero-ticket .ht-card input:not([type=checkbox]):not([type=radio])[aria-invalid=true]{border-color:var(--danger)}
.cf-hero-ticket .ht-card input:not([type=checkbox]):not([type=radio])[aria-invalid=true]:focus{box-shadow:0 0 0 3px var(--danger-soft)}
.cf-hero-ticket .ht-card input:disabled{opacity:.6;cursor:not-allowed}
.cf-hero-ticket .ht-card :is(a,button){min-height:64px;padding:12px 24px;border:1px solid oklch(from var(--ht-bg2) calc(l - .04) c h);border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(180deg,oklch(from var(--ht-bg) calc(l + .04) c h),oklch(from var(--ht-bg2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--ht-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--ht-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--ht-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--ht-shadow) l c h / .35));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;cursor:pointer}
.cf-hero-ticket .ht-card :is(a,button):not(:disabled):hover{background:linear-gradient(180deg,oklch(from var(--ht-bg) calc(l - .01) c h),oklch(from var(--ht-bg2) calc(l - .07) c h));transform:translateY(-1px)}
.cf-hero-ticket .ht-card :is(a,button):not(:disabled):active{transform:translateY(1px);box-shadow:var(--button-shadow,inset 0 2px 4px oklch(from var(--ht-bg) calc(l - .2) c h / .45),inset 0 -2px 0 oklch(from var(--ht-bg) calc(l - .16) c h),0 1px 1px oklch(from var(--ht-shadow) l c h / .3))}
.cf-hero-ticket .ht-card :is(a,button):focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .55);outline-offset:3px}
.cf-hero-ticket .ht-card :is(a,button):disabled,.cf-hero-ticket .ht-card :is(a,button)[aria-disabled=true]{opacity:.6;cursor:not-allowed;transform:none}
.cf-hero-ticket .ht-card :is(a,button)>span{opacity:1;text-wrap:balance}
.cf-hero-ticket .ht-card :is(a,button)>span:first-child{font-weight:inherit;font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15}
.cf-hero-ticket .ht-card :is(a,button)>span+span{font-family:var(--font-body);font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;margin-top:2px}
.cf-hero-ticket .ht-rise{animation:ht-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--ht-i,0) * .07s)}
@media (max-width:639px){.cf-hero-ticket .ht-card :is(a,button){padding:12px 16px}}
@media (min-width:1024px){.cf-hero-ticket .ht-photo{display:flex;flex-direction:column;height:100%}.cf-hero-ticket .ht-frame{aspect-ratio:auto;flex:1 1 auto;min-height:520px}}
@keyframes ht-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ht-settle{from{transform:scale(1.04)}to{transform:scale(1)}}
@keyframes ht-swipe{from{background-size:0 .62em}to{background-size:100% .62em}}
@media (prefers-reduced-motion:reduce){.cf-hero-ticket .ht-media,.cf-hero-ticket .ht-rise,.cf-hero-ticket .ht-title .ht-hl{animation:none}.cf-hero-ticket .ht-card :is(a,button),.cf-hero-ticket .ht-card input{transition:none}.cf-hero-ticket .ht-card :is(a,button):not(:disabled):hover,.cf-hero-ticket .ht-card :is(a,button):not(:disabled):active{transform:none}}
`;
pieces/kit/hero-ticket/specimen.tsx 25 lines
import { HeroTicket } from "../hero-ticket";
import { Section } from "../core";
import { OptinForm } from "../optin-form";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
// Specimen for hero-ticket.tsx. Fictional Funnel Starter Workshop. The photo is an illustrative stock scene, not a customer; proof is still unsupplied.
export const states = ["default"];
export default function Page({ state }: { state?: string } = {}) {
void state;
const title = <>Map Out Your First Funnel <span className="ht-hl">Before You Build a Page</span></>;
const lead = "Join the free Funnel Starter Workshop and walk through your offer, page copy and next steps. Watch online whenever it suits you and leave with a plan for the first page you’ll build.";
return <>
<Section><HeroTicket
title={title}
lead={lead}
action={<OptinForm fields={[{label:"Email address",name:"ticket-email",type:"email",autoComplete:"email"}]} button={defaults.sample.registration.label} sub="Free · Watch online" privacy={defaults.sample.registration.privacy}/>}
sceneImage={slot("scene", "https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?auto=format&fit=crop&w=1200&q=80")}
imageAlt="Smiling professional woman in a bright office"
imagePosition="center 25%"
caption="Plan your offer, page copy and next steps"
/></Section>
</>;
}
| Name | Type | Details |
|---|---|---|
prehead OptionalHeroTicket |
ReactNode |
|
stub OptionalHeroTicket |
ReactNode |
|
title OptionalHeroTicket |
ReactNode |
Default <>Map Out Your First Funnel <span className="ht-hl">Before You Build a Page</span></>
|
lead OptionalHeroTicket |
ReactNode |
|
action RequiredHeroTicket |
ReactNode |
|
sceneImage OptionalHeroTicket |
string |
|
image OptionalHeroTicket |
ReactNode |
|
imageSrc OptionalHeroTicket |
string |
|
imageAlt OptionalHeroTicket |
string |
Default ""
|
caption OptionalHeroTicket |
ReactNode |
|
imagePosition OptionalHeroTicket |
string |
Default "center"
|
className OptionalHeroTicket |
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.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
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
-
c5c36baf6b897f22.svg image/svg+xml · 236 Bytes
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB