Neon Sales Hero 1
Editorial front-page product sales hero with overhanging product showcase, clay Spot benefit rows, and price-in-button CTA.
Use it in a prompt
Use hero/neon-sales-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/neon-sales-hero.tsx. - Import it and pass your copy and images (Props tab):
import { NeonSalesHero } from "@/components/funneldna/hero/neon-sales-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/neon-sales-hero/component.tsx 1072 lines
// layout: advertorial-front
// Editorial front-page product sales hero with overhanging product showcase, clay Spot benefit rows, and price-in-button CTA.
import React, { useId, useRef, useState } from "react";
import { AlertCircle, ShieldCheck, Star } from "lucide-react";
import { Spot } from "../fx/fx";
import checklistSpot from "../fx/spots/checklist";
import shieldSpot from "../fx/spots/shield";
import clockSpot from "../fx/spots/clock";
export type NeonSalesHeroBenefit = {
/** Short editorial index shown beside the benefit, e.g. "01" */
code?: string;
/** Benefit headline */
title: string;
/** One-sentence plain explanation of the benefit */
detail: string;
/** Imported clay Spot illustration URL from ../fx/spots/* */
spot: string;
};
export type NeonSalesHeroProps = {
/** Brand or line name displayed in the masthead and product nameplate */
brandName?: string;
/** Live product name displayed beside the masthead and beneath the bottle photo */
productName?: string;
/** Short edition/spec line for the masthead dateline and product card */
editionNote?: string;
/** Main sales headline naming who the product is for and the result */
headline?: React.ReactNode;
/** Short sub-head explaining what the product does */
subhead?: React.ReactNode;
/** Italic aside in the author's voice appended after the sub-head */
aside?: string;
/** Three benefit points paired with Spot clay illustrations */
benefits?: NeonSalesHeroBenefit[];
/** Primary outcome-driven CTA label (line 1 of the button) */
ctaLabel?: string;
/** Price and what is included, rendered on the button's second line */
priceLine?: string;
/** One-line guarantee statement below the CTA button */
guarantee?: string;
/** Generated studio product photo URL (no text in the image) */
productImage?: string;
/** Accessible description of the product photo */
productImageAlt?: string;
/** Optional star rating text (omitted entirely when empty) */
rating?: string;
/** Optional review count label paired with rating (omitted when empty) */
reviewCount?: string;
/** Optional navigation URL for the primary CTA */
href?: string;
/** Action callback invoked when the visitor activates the primary CTA */
onAction?: () => void;
/** Inline error notice shown when state is "error" */
errorMessage?: string;
/** Interactive preview state */
state?: "default" | "hover" | "active" | "disabled" | "error";
/** Optional root className for page-level placement */
className?: string;
};
const DEFAULT_BENEFITS: NeonSalesHeroBenefit[] = [
{
code: "01",
title: "Fragrance-free",
detail: "No added perfume or essential oils to sting reactive skin.",
spot: checklistSpot,
},
{
code: "02",
title: "For dry and sensitive skin",
detail: "Made to cushion tight, easily irritated skin overnight.",
spot: shieldSpot,
},
{
code: "03",
title: "One pump at night",
detail: "Press once after cleansing. One 30 ml bottle simplifies bedtime.",
spot: clockSpot,
},
];
export function NeonSalesHero({
brandName = "Mirelune Skincare",
productName = "Overnight Repair Serum",
editionNote = "30 ml · Ships free",
headline = "Calm dry, sensitive skin overnight with one quiet pump",
subhead = "An unscented nightly serum made to comfort dry, reactive skin while you sleep.",
aside = "(Yes—just one pump, not a five-bottle shelf.)",
benefits = DEFAULT_BENEFITS,
ctaLabel = "Get my serum",
priceLine = "$48 · 30 ml · Ships free",
guarantee = "60-day money-back guarantee.",
productImage = "",
productImageAlt = "Frosted glass dropper bottle of Overnight Repair Serum on a lit stone surface",
rating = "",
reviewCount = "",
href,
onAction,
errorMessage = "We couldn’t start your order right now. Please try again.",
state = "default",
className = "",
}: NeonSalesHeroProps) {
const headingId = useId();
const [activeIndex, setActiveIndex] = useState(0);
const [tilt, setTilt] = useState({ rx: 0, ry: 0 });
const mediaRef = useRef<HTMLDivElement | null>(null);
const safeBenefits = benefits.length > 0 ? benefits : DEFAULT_BENEFITS;
const clampedIndex = Math.min(activeIndex, safeBenefits.length - 1);
const activeBenefit = safeBenefits[clampedIndex];
const isDisabled = state === "disabled";
const isError = state === "error";
const showRating = Boolean(rating && rating.trim().length > 0);
const handleTiltMove = (e: React.MouseEvent<HTMLDivElement>) => {
if (typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
return;
}
if (typeof window !== "undefined" && !window.matchMedia("(hover: hover) and (pointer: fine)").matches) {
return;
}
const el = mediaRef.current;
if (!el) return;
const rect = el.getBoundingClientRect();
if (!rect.width || !rect.height) return;
const x = (e.clientX - rect.left) / rect.width - 0.5;
const y = (e.clientY - rect.top) / rect.height - 0.5;
setTilt({ rx: Number((-y * 4.5).toFixed(2)), ry: Number((x * 4.5).toFixed(2)) });
};
const handleTiltLeave = () => {
setTilt({ rx: 0, ry: 0 });
};
const handleActionClick = (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {
if (isDisabled) {
e.preventDefault();
return;
}
if (onAction) {
if (!href) e.preventDefault();
onAction();
}
};
const ctaContent = (
<>
<span className="cf-neon-sales-hero-cta-main">{ctaLabel}</span>
{priceLine ? <span className="cf-neon-sales-hero-cta-price">{priceLine}</span> : null}
</>
);
return (
<section
className={`cf-neon-sales-hero${className ? ` ${className}` : ""}`}
aria-labelledby={headingId}
data-state={state}
>
<style>{CSS}</style>
<div className="cf-neon-sales-hero-stage">
<div className="cf-neon-sales-hero-inner">
<header className="cf-neon-sales-hero-masthead">
<div className="cf-neon-sales-hero-masthead-brand">
<span className="cf-neon-sales-hero-brand-name">{brandName}</span>
<span className="cf-neon-sales-hero-dot" aria-hidden="true" />
<span className="cf-neon-sales-hero-product-tag">{productName}</span>
</div>
<div className="cf-neon-sales-hero-dateline">
<span>{editionNote}</span>
{showRating ? (
<span className="cf-neon-sales-hero-rating-inline">
<Star
size={16}
strokeWidth={2.5}
className="cf-neon-sales-hero-star"
aria-hidden="true"
/>
<span>{rating}</span>
{reviewCount ? <span>({reviewCount})</span> : null}
</span>
) : null}
</div>
</header>
<div className="cf-neon-sales-hero-grid">
<div className="cf-neon-sales-hero-headline-area">
<h1 id={headingId} className="cf-neon-sales-hero-h1">
{headline}
</h1>
</div>
<div className="cf-neon-sales-hero-lead-area">
<p className="cf-neon-sales-hero-lead">
{subhead}
{aside ? (
<>
{" "}
<em className="cf-neon-sales-hero-aside">{aside}</em>
</>
) : null}
</p>
</div>
<div className="cf-neon-sales-hero-benefits-area">
<div className="cf-neon-sales-hero-benefits" role="list" aria-label={`${productName} key benefits`}>
{safeBenefits.map((item, index) => {
const isSelected = index === clampedIndex;
const codeLabel = item.code || String(index + 1).padStart(2, "0");
return (
<div
key={`${item.title}-${index}`}
className="cf-neon-sales-hero-benefit-wrap"
role="listitem"
>
<button
type="button"
className={`cf-neon-sales-hero-benefit${isSelected ? " is-selected" : ""}`}
aria-pressed={isSelected}
onClick={() => setActiveIndex(index)}
onMouseEnter={() => setActiveIndex(index)}
>
<span className="cf-neon-sales-hero-spot" aria-hidden="true">
<Spot
src={item.spot}
size={56}
tone="accent-fill"
shade="band"
light="band-ink"
/>
</span>
<span className="cf-neon-sales-hero-benefit-copy">
<span className="cf-neon-sales-hero-benefit-head">
<span className="cf-neon-sales-hero-benefit-num">{codeLabel}</span>
<span className="cf-neon-sales-hero-benefit-title">{item.title}</span>
</span>
<span className="cf-neon-sales-hero-benefit-detail">{item.detail}</span>
</span>
</button>
</div>
);
})}
</div>
</div>
<div className="cf-neon-sales-hero-action-area">
<div className="cf-neon-sales-hero-cta-wrap">
{href && !isDisabled ? (
<a
href={href}
className="cf-neon-sales-hero-cta"
data-state={state}
onClick={handleActionClick}
>
{ctaContent}
</a>
) : (
<button
type="button"
className="cf-neon-sales-hero-cta"
data-state={state}
disabled={isDisabled}
aria-disabled={isDisabled || undefined}
onClick={handleActionClick}
>
{ctaContent}
</button>
)}
{isError && errorMessage ? (
<p className="cf-neon-sales-hero-error" role="alert">
<AlertCircle
size={16}
strokeWidth={2.5}
className="cf-neon-sales-hero-inline-icon"
aria-hidden="true"
/>
{errorMessage}
</p>
) : null}
{guarantee ? (
<p className="cf-neon-sales-hero-guarantee">
<ShieldCheck
size={16}
strokeWidth={2.5}
className="cf-neon-sales-hero-inline-icon"
aria-hidden="true"
/>
{guarantee}
</p>
) : null}
</div>
</div>
<div className="cf-neon-sales-hero-media-area">
<article className="cf-neon-sales-hero-card">
<div
ref={mediaRef}
className="cf-neon-sales-hero-photo-stage"
onMouseMove={handleTiltMove}
onMouseLeave={handleTiltLeave}
style={{
transform: `perspective(900px) rotateX(${tilt.rx}deg) rotateY(${tilt.ry}deg)`,
}}
>
{productImage ? (
<img
src={productImage}
alt={productImageAlt}
className="cf-neon-sales-hero-photo"
loading="eager"
decoding="async"
/>
) : (
<div className="cf-neon-sales-hero-photo-empty" aria-hidden="true">
<span>{productName}</span>
</div>
)}
</div>
<div className="cf-neon-sales-hero-plate">
<div className="cf-neon-sales-hero-plate-top">
<div>
<p className="cf-neon-sales-hero-plate-brand">{brandName}</p>
<h2 className="cf-neon-sales-hero-plate-name">{productName}</h2>
</div>
<span className="cf-neon-sales-hero-plate-spec">{editionNote}</span>
</div>
{showRating ? (
<div className="cf-neon-sales-hero-plate-rating">
<span className="cf-neon-sales-hero-stars" aria-hidden="true">
{[0, 1, 2, 3, 4].map((starIndex) => (
<Star
key={starIndex}
size={16}
strokeWidth={2.5}
className="cf-neon-sales-hero-star"
/>
))}
</span>
<span className="cf-neon-sales-hero-plate-rating-val">{rating}</span>
{reviewCount ? (
<span className="cf-neon-sales-hero-plate-rating-count">
{reviewCount}
</span>
) : null}
</div>
) : null}
{activeBenefit ? (
<div className="cf-neon-sales-hero-well" aria-live="polite">
<p className="cf-neon-sales-hero-well-head">
<span className="cf-neon-sales-hero-well-dot" aria-hidden="true" />
<span>
{activeBenefit.code || String(clampedIndex + 1).padStart(2, "0")} ·{" "}
{activeBenefit.title}
</span>
</p>
<p className="cf-neon-sales-hero-well-copy">{activeBenefit.detail}</p>
</div>
) : null}
</div>
</article>
</div>
</div>
</div>
</div>
</section>
);
}
const CSS = `
.cf-neon-sales-hero,
.cf-neon-sales-hero * {
box-sizing: border-box;
}
.cf-neon-sales-hero {
position: relative;
width: 100%;
background: transparent;
padding-bottom: 64px;
font-family: var(--font-body);
color: var(--band-ink);
}
.cf-neon-sales-hero-stage {
position: relative;
width: 100%;
background: var(--band);
color: var(--band-ink);
padding: clamp(40px, 5.5vw, 68px) clamp(16px, 5vw, 48px) clamp(48px, 6vw, 72px);
}
.cf-neon-sales-hero-inner {
max-width: 1120px;
margin: 0 auto;
}
/* Editorial front-page masthead */
.cf-neon-sales-hero-masthead {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 8px 20px;
padding-bottom: 14px;
margin-bottom: clamp(20px, 3vw, 32px);
border-bottom: 2px solid oklch(from var(--band-ink) l c h / 0.28);
position: relative;
}
.cf-neon-sales-hero-masthead::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: -6px;
height: 1px;
background: oklch(from var(--band-ink) l c h / 0.14);
}
.cf-neon-sales-hero-masthead-brand {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
min-width: 0;
}
.cf-neon-sales-hero-brand-name {
font-family: var(--font-display);
font-size: 0.875rem;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--band-ink);
line-height: 1.2;
}
.cf-neon-sales-hero-dot {
width: 7px;
height: 7px;
border-radius: 999px;
background: var(--accent-fill, var(--accent));
flex: 0 0 auto;
}
.cf-neon-sales-hero-product-tag {
font-size: 0.9375rem;
font-weight: 600;
color: var(--band-ink);
line-height: 1.3;
}
.cf-neon-sales-hero-dateline {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
gap: 14px;
font-size: 0.875rem;
font-weight: 600;
color: var(--band-ink);
line-height: 1.3;
font-variant-numeric: tabular-nums;
}
.cf-neon-sales-hero-rating-inline {
display: inline-flex;
align-items: center;
gap: 6px;
}
.cf-neon-sales-hero-star {
color: var(--accent-fill, var(--accent));
fill: currentColor;
flex: 0 0 auto;
}
/* Front-page grid: desktop broadsheet, mobile photo-first */
.cf-neon-sales-hero-grid {
display: grid;
grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
grid-template-areas:
"headline headline"
"lead media"
"benefits media"
"action media";
column-gap: clamp(32px, 5vw, 64px);
row-gap: 0;
align-items: start;
}
.cf-neon-sales-hero-headline-area {
grid-area: headline;
padding-bottom: clamp(20px, 3vw, 32px);
margin-bottom: clamp(24px, 3.2vw, 36px);
border-bottom: 1px solid oklch(from var(--band-ink) l c h / 0.16);
}
.cf-neon-sales-hero-h1 {
margin: 0;
font-family: var(--font-display);
font-size: clamp(2.25rem, 5.2vw, 4.5rem);
font-weight: var(--display-weight, 800);
line-height: 1.04;
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
color: var(--band-ink);
text-wrap: balance;
animation: cf-nsh-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-neon-sales-hero-lead-area {
grid-area: lead;
margin-bottom: 24px;
}
.cf-neon-sales-hero-lead {
margin: 0;
font-family: var(--font-body);
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
font-weight: 500;
line-height: 1.45;
color: var(--band-ink);
max-width: 56ch;
text-wrap: pretty;
animation: cf-nsh-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.07s both;
}
.cf-neon-sales-hero-aside {
font-style: italic;
font-weight: 400;
}
/* Spot clay illustration benefit ledger */
.cf-neon-sales-hero-benefits-area {
grid-area: benefits;
margin-bottom: 28px;
}
.cf-neon-sales-hero-benefits {
display: flex;
flex-direction: column;
border-top: 1px solid oklch(from var(--band-ink) l c h / 0.16);
animation: cf-nsh-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.14s both;
}
.cf-neon-sales-hero-benefit-wrap {
border-bottom: 1px solid oklch(from var(--band-ink) l c h / 0.16);
}
.cf-neon-sales-hero-benefit {
width: 100%;
display: grid;
grid-template-columns: 56px minmax(0, 1fr);
align-items: start;
gap: 16px;
padding: 16px 12px;
background: transparent;
border: 0;
border-radius: var(--radius, 12px);
text-align: left;
color: var(--band-ink);
cursor: pointer;
font-family: inherit;
transition: background 0.16s ease, transform 0.16s ease;
}
.cf-neon-sales-hero-benefit:hover,
.cf-neon-sales-hero-benefit.is-selected {
background: oklch(from var(--band-ink) l c h / 0.08);
}
.cf-neon-sales-hero-benefit:focus-visible {
outline: 3px solid var(--field-focus, var(--accent-fill, var(--accent)));
outline-offset: 2px;
}
.cf-neon-sales-hero-spot {
width: 56px;
height: 56px;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
transition: transform 0.16s ease;
}
.cf-neon-sales-hero-benefit.is-selected .cf-neon-sales-hero-spot {
transform: scale(1.06);
}
.cf-neon-sales-hero-benefit-copy {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.cf-neon-sales-hero-benefit-head {
display: flex;
align-items: baseline;
gap: 10px;
flex-wrap: wrap;
}
.cf-neon-sales-hero-benefit-num {
font-family: var(--font-display);
font-size: 0.875rem;
font-weight: 800;
font-variant-numeric: tabular-nums;
color: var(--band-ink);
letter-spacing: 0.04em;
}
.cf-neon-sales-hero-benefit-title {
font-family: var(--font-display);
font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
font-weight: 800;
line-height: 1.2;
letter-spacing: -0.01em;
color: var(--band-ink);
}
.cf-neon-sales-hero-benefit-detail {
font-size: 1rem;
font-weight: 400;
line-height: 1.45;
color: var(--band-ink);
text-wrap: pretty;
}
/* Action & price-in-button CTA */
.cf-neon-sales-hero-action-area {
grid-area: action;
animation: cf-nsh-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.21s both;
}
.cf-neon-sales-hero-cta-wrap {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.cf-neon-sales-hero-cta {
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
width: 100%;
max-width: 440px;
min-height: 78px;
padding: 14px 28px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta)) calc(l + 0.04) c h),
var(--button-bg-2, var(--cta-2, oklch(from var(--cta) calc(l - 0.05) c h)))
);
color: var(--button-ink, var(--cta-ink));
font-family: var(--button-font, var(--font-display));
text-decoration: none;
text-align: center;
cursor: pointer;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(
--button-shadow,
inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.28),
0 8px 16px -6px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.34)
);
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-neon-sales-hero-cta:hover:not(:disabled),
.cf-neon-sales-hero-cta[data-state="hover"] {
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta)) calc(l - 0.01) c h),
oklch(from var(--button-bg, var(--cta)) calc(l - 0.09) c h)
);
transform: translateY(-1px);
box-shadow:
inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.65),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.18) c h),
0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.3),
0 12px 22px -6px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.38);
}
.cf-neon-sales-hero-cta:active:not(:disabled),
.cf-neon-sales-hero-cta[data-state="active"] {
background: oklch(from var(--button-bg, var(--cta)) calc(l - 0.1) c h);
transform: translateY(1px);
box-shadow:
inset 0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.32),
inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.22);
}
.cf-neon-sales-hero-cta:focus-visible {
outline: 3px solid var(--band-ink);
outline-offset: 3px;
}
.cf-neon-sales-hero-cta:disabled,
.cf-neon-sales-hero-cta[data-state="disabled"] {
background: var(--secondary);
color: var(--muted);
text-shadow: none;
box-shadow: none;
cursor: not-allowed;
transform: none;
}
.cf-neon-sales-hero-cta-main {
font-size: clamp(1.1875rem, 1.55vw, 1.375rem);
font-weight: var(--button-weight, 800);
line-height: 1.15;
text-transform: var(--button-case, none);
letter-spacing: -0.01em;
}
.cf-neon-sales-hero-cta-price {
font-family: var(--font-body);
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.3;
font-variant-numeric: tabular-nums;
text-transform: none;
text-wrap: pretty;
}
.cf-neon-sales-hero-error {
margin: 0;
width: 100%;
max-width: 440px;
padding: 10px 14px;
border-radius: var(--radius, 12px);
background: var(--danger-soft);
color: var(--danger);
border: 1px solid oklch(from var(--danger) l c h / 0.32);
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
text-wrap: pretty;
}
.cf-neon-sales-hero-guarantee {
margin: 0;
width: 100%;
max-width: 440px;
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
color: var(--band-ink);
text-align: center;
text-wrap: pretty;
}
.cf-neon-sales-hero-inline-icon {
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: 0.4em;
flex: 0 0 auto;
}
/* Overhanging focal product showcase card (overlap-edge) */
.cf-neon-sales-hero-media-area {
grid-area: media;
position: relative;
z-index: 2;
margin-bottom: -136px;
animation: cf-nsh-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}
.cf-neon-sales-hero-card {
background: var(--card);
color: var(--ink);
border: 1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg));
padding: clamp(14px, 2vw, 20px);
display: flex;
flex-direction: column;
gap: 16px;
}
.cf-neon-sales-hero-photo-stage {
border-radius: 12px;
overflow: hidden;
background: var(--band);
transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
will-change: transform;
}
.cf-neon-sales-hero-photo {
display: block;
width: 100%;
aspect-ratio: 4 / 5;
object-fit: cover;
object-position: center;
}
.cf-neon-sales-hero-photo-empty {
width: 100%;
aspect-ratio: 4 / 5;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background: var(--band);
color: var(--band-ink);
font-family: var(--font-display);
font-size: 1.3125rem;
font-weight: 800;
text-align: center;
}
.cf-neon-sales-hero-plate {
display: flex;
flex-direction: column;
gap: 12px;
}
.cf-neon-sales-hero-plate-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
}
.cf-neon-sales-hero-plate-brand {
margin: 0 0 2px;
font-size: 0.875rem;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--muted);
line-height: 1.25;
}
.cf-neon-sales-hero-plate-name {
margin: 0;
font-family: var(--font-display);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
font-weight: 800;
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--ink);
text-wrap: balance;
}
.cf-neon-sales-hero-plate-spec {
display: inline-flex;
align-items: center;
padding: 4px 12px;
border-radius: 999px;
background: color-mix(in oklch, var(--ink) 6%, var(--card));
color: var(--ink);
font-size: 0.875rem;
font-weight: 800;
line-height: 1.2;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.cf-neon-sales-hero-plate-rating {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
font-size: 0.9375rem;
line-height: 1.3;
}
.cf-neon-sales-hero-stars {
display: inline-flex;
align-items: center;
gap: 2px;
}
.cf-neon-sales-hero-plate-rating-val {
font-weight: 800;
color: var(--ink);
font-variant-numeric: tabular-nums;
}
.cf-neon-sales-hero-plate-rating-count {
color: var(--muted);
font-weight: 500;
}
/* Quiet neutral grey well inside card — never a card inside a card */
.cf-neon-sales-hero-well {
background: color-mix(in oklch, var(--ink) 4%, var(--card));
border-radius: 10px;
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 4px;
}
.cf-neon-sales-hero-well-head {
margin: 0;
display: flex;
align-items: center;
gap: 8px;
font-size: 0.875rem;
font-weight: 800;
line-height: 1.25;
color: var(--ink);
font-variant-numeric: tabular-nums;
}
.cf-neon-sales-hero-well-dot {
width: 8px;
height: 8px;
border-radius: 999px;
background: var(--accent-fill, var(--accent));
flex: 0 0 auto;
}
.cf-neon-sales-hero-well-copy {
margin: 0;
font-size: 0.9375rem;
font-weight: 400;
line-height: 1.4;
color: var(--muted);
text-wrap: pretty;
}
@keyframes cf-nsh-rise {
from {
opacity: 0.82;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Mobile: photo first, then headline, price-in-button CTA & guarantee within first screen */
@media (max-width: 899px) {
.cf-neon-sales-hero {
padding-bottom: 0;
}
.cf-neon-sales-hero-stage {
padding: 20px 16px 40px;
}
.cf-neon-sales-hero-masthead {
padding-bottom: 10px;
margin-bottom: 16px;
}
.cf-neon-sales-hero-product-tag,
.cf-neon-sales-hero-dot {
display: none;
}
.cf-neon-sales-hero-grid {
grid-template-columns: minmax(0, 1fr);
grid-template-areas:
"media"
"headline"
"action"
"lead"
"benefits";
row-gap: 16px;
}
.cf-neon-sales-hero-media-area {
margin-bottom: 0;
}
.cf-neon-sales-hero-card {
padding: 10px;
gap: 10px;
}
.cf-neon-sales-hero-photo,
.cf-neon-sales-hero-photo-empty {
aspect-ratio: 16 / 10;
}
.cf-neon-sales-hero-plate-brand,
.cf-neon-sales-hero-well {
display: none;
}
.cf-neon-sales-hero-plate-top {
align-items: center;
}
.cf-neon-sales-hero-plate-name {
font-size: 1.125rem;
}
.cf-neon-sales-hero-headline-area {
padding-bottom: 0;
margin-bottom: 0;
border-bottom: 0;
}
.cf-neon-sales-hero-h1 {
font-size: clamp(2rem, 8.2vw, 2.5rem);
}
.cf-neon-sales-hero-cta-wrap {
align-items: stretch;
}
.cf-neon-sales-hero-cta,
.cf-neon-sales-hero-error,
.cf-neon-sales-hero-guarantee {
max-width: none;
}
.cf-neon-sales-hero-lead-area {
margin-bottom: 4px;
padding-top: 8px;
border-top: 1px solid oklch(from var(--band-ink) l c h / 0.16);
}
.cf-neon-sales-hero-benefits-area {
margin-bottom: 0;
}
.cf-neon-sales-hero-benefit {
grid-template-columns: 48px minmax(0, 1fr);
gap: 12px;
padding: 14px 8px;
}
.cf-neon-sales-hero-spot {
width: 48px;
height: 48px;
}
}
@media (prefers-reduced-motion: reduce) {
.cf-neon-sales-hero-h1,
.cf-neon-sales-hero-lead,
.cf-neon-sales-hero-benefits,
.cf-neon-sales-hero-action-area,
.cf-neon-sales-hero-media-area {
animation: none;
}
.cf-neon-sales-hero-photo-stage,
.cf-neon-sales-hero-cta,
.cf-neon-sales-hero-benefit,
.cf-neon-sales-hero-spot {
transition: none;
transform: none !important;
}
}
`;
export default NeonSalesHero;
pieces/hero/neon-sales-hero/specimen.tsx 56 lines
import __studioImagedb44eec4 from "../assets/238391bdf1a6ed95.webp";
import React from "react";
import { NeonSalesHero, type NeonSalesHeroProps } from "../neon-sales-hero";
import { slot } from "../../slots";
import checklistSpot from "../../fx/spots/checklist";
import shieldSpot from "../../fx/spots/shield";
import clockSpot from "../../fx/spots/clock";
export const states = ["default", "hover", "active", "disabled", "error"] as const;
type SpecimenProps = {
state?: NeonSalesHeroProps["state"];
};
export default function NeonSalesHeroSpecimen({ state = "default" }: SpecimenProps) {
return (
<NeonSalesHero
brandName="Mirelune Skincare"
productName="Overnight Repair Serum"
editionNote="30 ml · Ships free"
headline="Calm dry, sensitive skin overnight with one quiet pump"
subhead="An unscented nightly serum made to comfort dry, reactive skin while you sleep."
aside="(Yes—just one pump, not a five-bottle shelf.)"
benefits={[
{
code: "01",
title: "Fragrance-free",
detail: "Zero added scent or essential oils, so sensitive skin stays comfortable.",
spot: checklistSpot,
},
{
code: "02",
title: "For dry and sensitive skin",
detail: "Cushions tight, flaky patches without feeling heavy on your pillow.",
spot: shieldSpot,
},
{
code: "03",
title: "One pump at night",
detail: "Press once after cleansing. One 30 ml bottle keeps bedtime effortless.",
spot: clockSpot,
},
]}
ctaLabel="Get my serum"
priceLine="$48 · 30 ml · Ships free"
guarantee="60-day money-back guarantee."
productImage={slot(
"product",
__studioImagedb44eec4
)}
productImageAlt="Mirelune Skincare Overnight Repair Serum 30 ml frosted glass dropper bottle on a lit stone surface"
state={state}
onAction={() => {}}
/>
);
}
| Name | Type | Details |
|---|---|---|
brandName OptionalNeonSalesHero |
string |
Default "Mirelune Skincare"
|
productName OptionalNeonSalesHero |
string |
Default "Overnight Repair Serum"
|
editionNote OptionalNeonSalesHero |
string |
Default "30 ml · Ships free"
|
headline OptionalNeonSalesHero |
React.ReactNode |
Default "Calm dry, sensitive skin overnight with one quiet pump"
|
subhead OptionalNeonSalesHero |
React.ReactNode |
Default "An unscented nightly serum made to comfort dry, reactive skin while you sleep."
|
aside OptionalNeonSalesHero |
string |
Default "(Yes—just one pump, not a five-bottle shelf.)"
|
benefits OptionalNeonSalesHero |
NeonSalesHeroBenefit[] |
Default DEFAULT_BENEFITS
|
ctaLabel OptionalNeonSalesHero |
string |
Default "Get my serum"
|
priceLine OptionalNeonSalesHero |
string |
Default "$48 · 30 ml · Ships free"
|
guarantee OptionalNeonSalesHero |
string |
Default "60-day money-back guarantee."
|
productImage OptionalNeonSalesHero |
string |
Default ""
|
productImageAlt OptionalNeonSalesHero |
string |
Default "Frosted glass dropper bottle of Overnight Repair Serum on a lit stone surface"
|
rating OptionalNeonSalesHero |
string |
Default ""
|
reviewCount OptionalNeonSalesHero |
string |
Default ""
|
href OptionalNeonSalesHero |
string |
|
onAction OptionalNeonSalesHero |
() => void |
|
errorMessage OptionalNeonSalesHero |
string |
Default "We couldn’t start your order right now. Please try again."
|
state OptionalNeonSalesHero |
"default" | "hover" | "active" | "disabled" | "error" |
Default "default"
|
className OptionalNeonSalesHero |
string |
Default ""
|
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-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
238391bdf1a6ed95.webp
image/webp · 23.3 KB
-
7c36d7f4dd4ae594.webp
image/webp · 26.5 KB
-
7d6f1c81c93d8f71.webp
image/webp · 18.2 KB
-
d0943b629c0b1324.webp
image/webp · 8.87 KB