Giveaway Entry 2
Giveaway entry block for a local service business: a full-bleed 'after' photo pictures the win, a future-pacing column sells it, and a sticky three-step entry card checks the zip against the service area before anyone can enter.
Use it in a prompt
Use forms/giveaway-entry-2 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/forms/giveaway-entry-2.tsx. - Import it and pass your copy and images (Props tab):
import { GiveawayEntry2 } from "@/components/funneldna/forms/giveaway-entry-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/giveaway-entry-2/component.tsx 884 lines
// layout: sticky-offer-side
// Giveaway entry block for a local service business: a full-bleed 'after' photo pictures the win, a future-pacing column sells it, and a sticky three-step entry card checks the zip against the service area before anyone can enter.
import React, { useEffect, useId, useRef, useState } from 'react';
import { AlertCircle, CalendarClock, Check, Loader2, MapPin } from 'lucide-react';
import { Spot } from '../fx/fx';
import calendar from '../fx/spots/calendar';
import clock from '../fx/spots/clock';
import community from '../fx/spots/community';
/** Everything the visitor answered, passed to onSubmit. */
export type GiveawayEntry2Values = {
name: string;
email: string;
zip: string;
/** true or false when a service-area list is supplied, null when there is none. */
inServiceArea: boolean | null;
/** The matched place name, when the list supplies one. */
servicePlace?: string;
agreedToRules: boolean;
};
/** The raw field values while the visitor works through the steps. */
export type GiveawayEntry2Answers = { name: string; email: string; zip: string; agreed: boolean };
/** One served zip. A 5-digit zip matches exactly; a shorter prefix (e.g. 802) matches every zip that starts with it. */
export type ServiceAreaZip = { zip: string; place?: string };
/** A future-pacing moment: life once the makeover is done. */
export type GiveawayMoment = {
title: string;
text?: string;
/** fx Spot illustration asset, imported from ../fx/spots/<name>. */
spot?: string;
};
export type GiveawayEntry2Copy = {
formTitle: string;
/** Placeholder: {date}. */
endsTemplate: string;
stepsLabel: string;
/** Three short step names. */
stepLabels: string[];
/** Phone step line. Placeholders: {n}, {total}, {label}. */
stepCounter: string;
detailsQuestion: string;
zipQuestion: string;
rulesQuestion: string;
nameLabel: string;
namePlaceholder: string;
nameError: string;
emailLabel: string;
emailPlaceholder: string;
emailError: string;
zipLabel: string;
zipPlaceholder: string;
zipHint: string;
zipError: string;
inAreaTitle: string;
/** Placeholders: {zip}, {place}. */
inAreaText: string;
/** Placeholder: {zip}. */
inAreaTextNoPlace: string;
outAreaTitle: string;
/** Placeholder: {areas}. */
outAreaText: string;
outAreaTextNoList: string;
/** Joins the last place in a list, e.g. Denver, Aurora, and Lakewood. */
listAnd: string;
summaryNameLabel: string;
summaryZipLabel: string;
editLabel: string;
editDetailsLabel: string;
editZipLabel: string;
/** The risk reversal that leads the final action. */
riskLead: string;
agreeBefore: string;
rulesLinkLabel: string;
agreeAfter: string;
rulesError: string;
backLabel: string;
/** Next button labels for steps 1 and 2. */
nextLabels: string[];
submitLabel: string;
pendingLabel: string;
submitError: string;
legal: string;
momentsHeading: string;
areaHeading: string;
};
export type GiveawayEntry2Props = {
/** Small sponsor line above the headline; empty hides it. */
sponsorLine?: string;
headline?: React.ReactNode;
/** A phrase inside a string headline that gets the accent marker stroke. */
highlight?: string;
lead?: React.ReactNode;
/** Slot scene: the full-bleed after photo. Empty hides the photo band. */
photo?: string;
photoAlt?: string;
/** CSS object-position for the photo crop. */
photoPosition?: string;
moments?: GiveawayMoment[];
/** Served zips; empty skips the area check. */
serviceArea?: ServiceAreaZip[];
/** Overrides the joined place names in the out-of-area note. */
serviceAreaLabel?: string;
/** Let out-of-area zips continue after the note (the rules decide who can win). */
allowOutsideArea?: boolean;
/** Supplied close date-time, ISO 8601 with offset. Empty hides the line. */
endsAt?: string;
/** The business's IANA time zone, e.g. America/Denver. The close date is shown in it. */
timeZone?: string;
locale?: string;
rulesHref?: string;
headingLevel?: 'h1' | 'h2';
initialValues?: Partial<GiveawayEntry2Answers>;
copy?: Partial<GiveawayEntry2Copy>;
/** All answers once every step is valid. Return false or throw to show the retry message. */
onSubmit?: (values: GiveawayEntry2Values) => void | boolean | Promise<void | boolean>;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
className?: string;
};
type Touched = Record<keyof GiveawayEntry2Answers, boolean>;
export function GiveawayEntry2(props: GiveawayEntry2Props) {
const {
sponsorLine = '',
headline = 'Win a free garden makeover. Picture it in your yard this summer.',
highlight = 'Picture it in your yard this summer.',
lead = 'Enter free in three quick steps for a garden makeover designed around your yard.',
photo = '',
photoAlt = '',
photoPosition = '40% 60%',
moments = DEFAULT_MOMENTS,
serviceArea = [],
serviceAreaLabel = '',
allowOutsideArea = false,
endsAt = '',
timeZone = 'UTC',
locale = 'en-US',
rulesHref = '#official-rules',
headingLevel = 'h2',
initialValues,
onSubmit,
state = 'default',
className = '',
} = props;
const copy: GiveawayEntry2Copy = { ...DEFAULT_COPY, ...props.copy };
const uid = useId().replace(/[^a-zA-Z0-9_-]/g, '');
const id = (key: string) => `gwe2-${key}-${uid}`;
const [values, setValues] = useState<GiveawayEntry2Answers>(() => startValues(state, initialValues));
const [touched, setTouched] = useState<Touched>(() => startTouched(state));
const [step, setStep] = useState(0);
const [pending, setPending] = useState(false);
const [failed, setFailed] = useState(false);
const mounted = useRef(true);
const moved = useRef(false);
const nameRef = useRef<HTMLInputElement>(null);
const zipRef = useRef<HTMLInputElement>(null);
const agreeRef = useRef<HTMLInputElement>(null);
useEffect(() => {
mounted.current = true;
return () => {
mounted.current = false;
};
}, []);
useEffect(() => {
moved.current = false;
setValues(startValues(state, initialValues));
setTouched(startTouched(state));
setStep(0);
setPending(false);
setFailed(false);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state]);
useEffect(() => {
if (!moved.current) return;
const target = step === 0 ? nameRef.current : step === 1 ? zipRef.current : agreeRef.current;
target?.focus();
}, [step]);
const disabled = state === 'disabled';
const name = values.name.trim();
const email = values.email.trim();
const zip = values.zip.trim();
const nameOk = name.length >= 2;
const emailOk = EMAIL.test(email);
const zipOk = ZIP.test(zip);
const hasArea = serviceArea.length > 0;
const match = zipOk && hasArea ? matchArea(zip, serviceArea) : null;
const areaOk = !hasArea || Boolean(match?.inArea) || allowOutsideArea;
const stepOk = [nameOk && emailOk, zipOk && areaOk, values.agreed];
const places = placesOf(serviceArea);
const areaText = serviceAreaLabel || joinList(places, copy.listAnd);
const ends = formatEnds(endsAt, timeZone, locale);
const labels = [0, 1, 2].map((i) => copy.stepLabels[i] ?? '');
const nameErr = touched.name && !nameOk;
const emailErr = touched.email && !emailOk;
const zipErr = touched.zip && !zipOk;
const agreeErr = touched.agreed && !values.agreed;
const update = (key: 'name' | 'email' | 'zip', value: string) => {
setValues((prev) => ({ ...prev, [key]: value }) as GiveawayEntry2Answers);
setFailed(false);
};
const touch = (key: keyof Touched) => () => setTouched((prev) => (prev[key] ? prev : ({ ...prev, [key]: true } as Touched)));
const go = (to: number) => {
moved.current = true;
setFailed(false);
setStep(Math.max(0, Math.min(2, to)));
};
function next() {
if (!stepOk[step]) {
setTouched((prev) => (step === 0 ? { ...prev, name: true, email: true } : { ...prev, zip: true }));
return;
}
go(step + 1);
}
async function send() {
if (!stepOk.every(Boolean)) {
setTouched({ name: true, email: true, zip: true, agreed: true });
return;
}
setPending(true);
setFailed(false);
const answers: GiveawayEntry2Values = {
name,
email,
zip,
inServiceArea: hasArea ? Boolean(match?.inArea) : null,
servicePlace: match?.place,
agreedToRules: true,
};
try {
const result = await onSubmit?.(answers);
if (result === false && mounted.current) setFailed(true);
} catch {
if (mounted.current) setFailed(true);
} finally {
if (mounted.current) setPending(false);
}
}
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (disabled || pending) return;
if (step < 2) {
next();
return;
}
void send();
};
const H = headingLevel;
const forced = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : '';
const rootClass = ['cf-gwe2', photo ? '' : 'no-photo', className].filter(Boolean).join(' ');
return (
<section className={rootClass} aria-labelledby={id('title')}>
<style>{CSS}</style>
{photo ? (
<div className='gwe-hero'>
<img src={photo} alt={photoAlt} width={1600} height={900} loading='eager' decoding='async' style={{ objectPosition: photoPosition }} />
</div>
) : null}
<div className='gwe-wrap'>
<div className='gwe-grid'>
<div className='gwe-intro'>
{sponsorLine ? (
<p className='gwe-sponsor'>
<MapPin className='gwe-inline' size={16} strokeWidth={2.5} aria-hidden='true' />
{sponsorLine}
</p>
) : null}
<H id={id('title')} className='gwe-title'>
{markPhrase(headline, highlight)}
</H>
{lead ? <p className='gwe-lead'>{lead}</p> : null}
</div>
<div className='gwe-card' role='group' aria-labelledby={id('form-title')}>
<h3 id={id('form-title')} className='gwe-card-title'>
{copy.formTitle}
</h3>
{ends ? (
<p className='gwe-ends'>
<CalendarClock className='gwe-inline' size={16} strokeWidth={2.5} aria-hidden='true' />
{fillNode(copy.endsTemplate, 'date', <span className='gwe-ends-date'>{ends}</span>)}
</p>
) : null}
<p className='gwe-counter' aria-hidden='true'>
{fill(copy.stepCounter, { n: String(step + 1), total: '3', label: labels[step] ?? '' })}
</p>
<ol className='gwe-steps' aria-label={copy.stepsLabel}>
{labels.map((label, i) => {
const status = i < step ? 'is-done' : i === step ? 'is-current' : 'is-next';
const inner = (
<>
<span className='gwe-step-bar' aria-hidden='true' />
<span className='gwe-step-label'>
{i < step ? (
<span className='gwe-badge' aria-hidden='true'>
<Check size={12} strokeWidth={3} />
</span>
) : (
<span className='gwe-step-num' aria-hidden='true'>
{i + 1}
</span>
)}
<span className='gwe-step-text'>{label}</span>
</span>
</>
);
return (
<li key={i} className={`gwe-step ${status}`} aria-current={i === step ? 'step' : undefined}>
{i < step && !disabled && !pending ? (
<button type='button' className='gwe-step-btn' onClick={() => go(i)}>
{inner}
</button>
) : (
<span className='gwe-step-btn'>{inner}</span>
)}
</li>
);
})}
</ol>
<form className='gwe-form' noValidate onSubmit={handleSubmit} aria-busy={pending || undefined}>
<fieldset className='gwe-shell' disabled={disabled}>
<div key={step} className='gwe-panel'>
{step === 0 ? (
<fieldset className='gwe-group'>
<legend className='gwe-legend'>{copy.detailsQuestion}</legend>
<Field
id={id('name')}
inputRef={nameRef}
label={copy.nameLabel}
error={nameErr ? copy.nameError : undefined}
type='text'
name='name'
autoComplete='name'
placeholder={copy.namePlaceholder}
value={values.name}
onChange={(e) => update('name', e.target.value)}
onBlur={touch('name')}
/>
<Field
id={id('email')}
label={copy.emailLabel}
error={emailErr ? copy.emailError : undefined}
type='email'
name='email'
autoComplete='email'
inputMode='email'
placeholder={copy.emailPlaceholder}
value={values.email}
onChange={(e) => update('email', e.target.value)}
onBlur={touch('email')}
/>
</fieldset>
) : null}
{step === 1 ? (
<fieldset className='gwe-group'>
<legend className='gwe-legend'>{copy.zipQuestion}</legend>
<Field
id={id('zip')}
inputRef={zipRef}
label={copy.zipLabel}
hint={copy.zipHint}
error={zipErr ? copy.zipError : undefined}
type='text'
name='zip'
autoComplete='postal-code'
inputMode='numeric'
maxLength={10}
placeholder={copy.zipPlaceholder}
value={values.zip}
onChange={(e) => update('zip', e.target.value.replace(/[^0-9-]/g, '').slice(0, 10))}
onBlur={touch('zip')}
/>
<div role='status' aria-live='polite'>
{match ? (
match.inArea ? (
<div key='in' className='gwe-note is-in'>
<span className='gwe-badge is-lg' aria-hidden='true'>
<Check size={16} strokeWidth={3} />
</span>
<div>
<p className='gwe-note-title'>{copy.inAreaTitle}</p>
<p className='gwe-note-text'>
{fill(match.place ? copy.inAreaText : copy.inAreaTextNoPlace, { zip, place: match.place ?? '' })}
</p>
</div>
</div>
) : (
<div key='out' className='gwe-note is-out'>
<MapPin className='gwe-note-icon' size={20} strokeWidth={2.5} aria-hidden='true' />
<div>
<p className='gwe-note-title'>{copy.outAreaTitle}</p>
<p className='gwe-note-text'>{areaText ? fill(copy.outAreaText, { areas: areaText }) : copy.outAreaTextNoList}</p>
</div>
</div>
)
) : null}
</div>
</fieldset>
) : null}
{step === 2 ? (
<fieldset className='gwe-group'>
<legend className='gwe-legend'>{copy.rulesQuestion}</legend>
<dl className='gwe-summary'>
<div className='gwe-sum-row'>
<dt>{copy.summaryNameLabel}</dt>
<dd>{name}</dd>
<dd>{email}</dd>
<dd className='gwe-sum-edit'>
<button type='button' className='gwe-edit' onClick={() => go(0)} aria-label={copy.editDetailsLabel}>
{copy.editLabel}
</button>
</dd>
</div>
<div className='gwe-sum-row'>
<dt>{copy.summaryZipLabel}</dt>
<dd>{match?.place ? `${zip} · ${match.place}` : zip}</dd>
<dd className='gwe-sum-edit'>
<button type='button' className='gwe-edit' onClick={() => go(1)} aria-label={copy.editZipLabel}>
{copy.editLabel}
</button>
</dd>
</div>
</dl>
<p className='gwe-risk'>
<span className='gwe-badge' aria-hidden='true'>
<Check size={12} strokeWidth={3} />
</span>
{copy.riskLead}
</p>
<label className={`gwe-agree${values.agreed ? ' is-on' : ''}${agreeErr ? ' is-error' : ''}`} htmlFor={id('agree')}>
<span className='gwe-box'>
<input
ref={agreeRef}
id={id('agree')}
type='checkbox'
name='rules'
checked={values.agreed}
onChange={(e) => {
const checked = e.target.checked;
setValues((prev) => ({ ...prev, agreed: checked }));
setFailed(false);
}}
onBlur={touch('agreed')}
aria-invalid={agreeErr || undefined}
aria-describedby={agreeErr ? id('agree-err') : undefined}
/>
<Check className='gwe-box-mark' size={16} strokeWidth={3} aria-hidden='true' />
</span>
<span className='gwe-agree-text'>
{copy.agreeBefore}{' '}
<a className='gwe-link' href={rulesHref}>
{copy.rulesLinkLabel}
</a>
{copy.agreeAfter}
</span>
</label>
{agreeErr ? (
<p id={id('agree-err')} className='gwe-error gwe-error-gap'>
<AlertCircle className='gwe-inline' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.rulesError}
</p>
) : null}
</fieldset>
) : null}
</div>
{failed ? (
<p className='gwe-fail' role='alert'>
<AlertCircle className='gwe-inline' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.submitError}
</p>
) : null}
<div className='gwe-nav'>
<button type='submit' className={`gwe-primary${forced}`}>
{step === 2 && pending ? (
<>
<Loader2 className='gwe-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
{copy.pendingLabel}
</>
) : step === 2 ? (
copy.submitLabel
) : (
copy.nextLabels[step] ?? ''
)}
</button>
{step > 0 ? (
<button type='button' className='gwe-secondary' onClick={() => go(step - 1)} disabled={pending}>
{copy.backLabel}
</button>
) : null}
</div>
</fieldset>
</form>
{copy.legal || rulesHref ? (
<p className='gwe-legal'>
{copy.legal}{' '}
<a className='gwe-link' href={rulesHref}>
{copy.rulesLinkLabel}
</a>
</p>
) : null}
</div>
{moments.length || areaText ? (
<div className='gwe-more'>
{moments.length ? (
<div>
<h3 className='gwe-h3'>{copy.momentsHeading}</h3>
<ul className='gwe-moments'>
{moments.map((moment, i) => (
<li key={`${moment.title}-${i}`} className={moment.spot ? 'gwe-moment' : 'gwe-moment no-spot'}>
{moment.spot ? <Spot src={moment.spot} size={64} /> : null}
<div className='gwe-moment-body'>
<h4 className='gwe-moment-title'>{moment.title}</h4>
{moment.text ? <p className='gwe-moment-text'>{moment.text}</p> : null}
</div>
</li>
))}
</ul>
</div>
) : null}
{areaText ? (
<div className='gwe-area'>
<h3 className='gwe-area-title'>
<MapPin className='gwe-inline' size={20} strokeWidth={2.5} aria-hidden='true' />
{copy.areaHeading}
</h3>
{places.length && !serviceAreaLabel ? (
<ul className='gwe-chips'>
{places.map((place) => (
<li key={place} className='gwe-chip'>
{place}
</li>
))}
</ul>
) : (
<p className='gwe-area-text'>{areaText}</p>
)}
</div>
) : null}
</div>
) : null}
</div>
</div>
</section>
);
}
export default GiveawayEntry2;
type FieldProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'id'> & {
id: string;
label: string;
hint?: string;
error?: string;
inputRef?: React.Ref<HTMLInputElement>;
};
function Field({ id, label, hint, error, inputRef, ...input }: FieldProps) {
const described = error ? `${id}-err` : hint ? `${id}-hint` : undefined;
return (
<div className='gwe-field'>
<label className='gwe-label' htmlFor={id}>
{label}
</label>
<input id={id} ref={inputRef} className='gwe-input' aria-invalid={error ? true : undefined} aria-describedby={described} {...input} />
{error ? (
<p id={`${id}-err`} className='gwe-error'>
<AlertCircle className='gwe-inline' size={16} strokeWidth={2.5} aria-hidden='true' />
{error}
</p>
) : hint ? (
<p id={`${id}-hint`} className='gwe-hint'>
{hint}
</p>
) : null}
</div>
);
}
const EMAIL = /^[^ @]+@[^ @]+[.][^ @]{2,}$/;
const ZIP = /^[0-9]{5}(-[0-9]{4})?$/;
/** Sample answers used only by the hover, active and error state previews. */
const PREVIEW = { name: 'Dana Reyes', email: 'dana@example.com', badEmail: 'dana@example' };
function startValues(state: GiveawayEntry2Props['state'], initial?: Partial<GiveawayEntry2Answers>): GiveawayEntry2Answers {
const base: GiveawayEntry2Answers = { name: '', email: '', zip: '', agreed: false, ...initial };
if (state === 'hover' || state === 'active') return { ...base, name: PREVIEW.name, email: PREVIEW.email };
if (state === 'error') return { ...base, name: PREVIEW.name, email: PREVIEW.badEmail };
return base;
}
function startTouched(state: GiveawayEntry2Props['state']): Touched {
const error = state === 'error';
return { name: error, email: error, zip: false, agreed: false };
}
function matchArea(zip: string, area: ServiceAreaZip[]) {
const z = zip.slice(0, 5);
const hit = area.find((entry) => {
const key = entry.zip.replace(/[^0-9]/g, '');
if (!key) return false;
return key.length >= 5 ? z === key.slice(0, 5) : z.startsWith(key);
});
return { inArea: Boolean(hit), place: hit?.place?.trim() || undefined };
}
function placesOf(area: ServiceAreaZip[]) {
const seen: string[] = [];
for (const entry of area) {
const place = entry.place?.trim();
if (place && !seen.includes(place)) seen.push(place);
}
return seen;
}
function joinList(items: string[], and: string) {
if (items.length === 0) return '';
if (items.length === 1) return items[0] ?? '';
if (items.length === 2) return `${items[0]} ${and} ${items[1]}`;
return `${items.slice(0, -1).join(', ')}, ${and} ${items[items.length - 1]}`;
}
function fill(template: string, vars: Record<string, string>) {
return template.replace(/[{]([a-zA-Z]+)[}]/g, (whole: string, key: string) => vars[key] ?? whole);
}
/** Replaces one {key} placeholder with a node, so the filled value can carry its own styling. */
function fillNode(template: string, key: string, node: React.ReactNode): React.ReactNode {
const token = `{${key}}`;
const at = template.indexOf(token);
if (at < 0) return template;
return (
<>
{template.slice(0, at)}
{node}
{template.slice(at + token.length)}
</>
);
}
function formatEnds(iso: string, timeZone: string, locale: string) {
if (!iso) return '';
const date = new Date(iso);
if (Number.isNaN(date.getTime())) return '';
const options: Intl.DateTimeFormatOptions = { weekday: 'short', month: 'long', day: 'numeric', hour: 'numeric', minute: '2-digit', timeZoneName: 'short' };
try {
return new Intl.DateTimeFormat(locale, { ...options, timeZone }).format(date);
} catch {
try {
return new Intl.DateTimeFormat(locale, options).format(date);
} catch {
return '';
}
}
}
function markPhrase(node: React.ReactNode, phrase: string): React.ReactNode {
if (typeof node !== 'string' || !phrase) return node;
const at = node.indexOf(phrase);
if (at < 0) return node;
return (
<>
{node.slice(0, at)}
<span className='gwe-mark'>{phrase}</span>
{node.slice(at + phrase.length)}
</>
);
}
const DEFAULT_MOMENTS: GiveawayMoment[] = [
{ title: 'Long evenings outside', text: 'Dinner on the back step while the light fades over a yard you love.', spot: calendar },
{ title: 'Weekends back', text: 'Less time fighting the yard. More time enjoying it.', spot: clock },
{ title: 'The yard on the block', text: 'The one your neighbors slow down to look at.', spot: community },
];
const DEFAULT_COPY: GiveawayEntry2Copy = {
formTitle: 'Claim your free entry',
endsTemplate: 'Entries close {date}',
stepsLabel: 'Entry steps',
stepLabels: ['Your details', 'Zip code', 'Rules'],
stepCounter: 'Step {n} of {total}: {label}',
detailsQuestion: 'Who’s entering?',
zipQuestion: 'Where’s the yard?',
rulesQuestion: 'Last step: confirm your entry',
nameLabel: 'Full name',
namePlaceholder: 'Jane Smith',
nameError: 'Add your name so we know who’s entering.',
emailLabel: 'Email address',
emailPlaceholder: 'you@example.com',
emailError: 'Enter an email like you@example.com.',
zipLabel: 'Zip code of the yard',
zipPlaceholder: '12345',
zipHint: 'We’ll check it’s in the area we serve.',
zipError: 'Enter a 5-digit zip code.',
inAreaTitle: 'Good news: you’re in our area',
inAreaText: '{zip} is in {place}, an area we serve.',
inAreaTextNoPlace: '{zip} is in an area we serve.',
outAreaTitle: 'That zip is just outside our area',
outAreaText: 'This giveaway is open to homes we serve in {areas}. Entering for a different home? Use its zip code.',
outAreaTextNoList: 'This giveaway is open to homes in our service area. Entering for a different home? Use its zip code.',
listAnd: 'and',
summaryNameLabel: 'Entering as',
summaryZipLabel: 'Yard zip code',
editLabel: 'Edit',
editDetailsLabel: 'Edit your name and email',
editZipLabel: 'Edit your zip code',
riskLead: 'Free to enter. No purchase necessary.',
agreeBefore: 'I’m 18 or older and I agree to the',
rulesLinkLabel: 'Official Rules',
agreeAfter: '.',
rulesError: 'Tick the box to agree to the Official Rules.',
backLabel: 'Back',
nextLabels: ['Next: your zip code', 'Next: the rules'],
submitLabel: 'Enter the giveaway',
pendingLabel: 'Sending your entry…',
submitError: 'We couldn’t send your entry. Please try again.',
legal: 'No purchase necessary. Void where prohibited.',
momentsHeading: 'Picture your summer in it',
areaHeading: 'Open to homes in our service area',
};
// The white glyph inside solid status badges is the documented exception (theme-contract: status icon badges).
const CSS = `
.cf-gwe2{--gwe-gutter:clamp(16px,5vw,48px);--gwe-shadow:var(--shadow,oklch(0.22 0.03 260));position:relative;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding-bottom:clamp(64px,8.5vw,120px)}
.cf-gwe2 *,.cf-gwe2 *::before,.cf-gwe2 *::after{box-sizing:border-box}
.cf-gwe2 :where(h1,h2,h3,h4,p,ul,ol,dl,dt,dd,fieldset,legend){margin:0;padding:0}
.cf-gwe2 :where(ul,ol){list-style:none}
.cf-gwe2 :where(fieldset){border:0;min-width:0}
.cf-gwe2.no-photo{padding-top:clamp(56px,8vw,112px)}
.cf-gwe2 .gwe-inline{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;flex:none}
.cf-gwe2 .gwe-hero{position:relative;height:clamp(440px,44vw,620px);overflow:hidden;background:color-mix(in oklch,var(--ink) 6%,var(--surface))}
.cf-gwe2 .gwe-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.cf-gwe2 .gwe-hero::after{content:'';position:absolute;inset:auto 0 0 0;height:38%;background:linear-gradient(oklch(from var(--band) l c h / 0),oklch(from var(--band) l c h / .28));pointer-events:none}
.cf-gwe2 .gwe-wrap{max-width:1120px;margin-inline:auto;padding-inline:var(--gwe-gutter);box-sizing:content-box}
.cf-gwe2 .gwe-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,448px);grid-template-areas:'intro card' 'more card';column-gap:clamp(32px,5vw,72px);align-items:start}
.cf-gwe2 .gwe-intro{grid-area:intro;padding-top:clamp(40px,5vw,64px);animation:gwe-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-gwe2 .gwe-sponsor{margin-bottom:16px;font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-gwe2 .gwe-sponsor .gwe-inline{color:var(--accent)}
.cf-gwe2 .gwe-title{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
.cf-gwe2 .gwe-mark{color:var(--accent);background-image:linear-gradient(transparent 60%,color-mix(in oklch,var(--accent-fill,var(--accent)) 22%,transparent) 60%,color-mix(in oklch,var(--accent-fill,var(--accent)) 22%,transparent) 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-inline:.04em}
.cf-gwe2 .gwe-lead{margin-top:16px;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--ink);text-wrap:pretty}
.cf-gwe2 .gwe-card{grid-area:card;position:sticky;top:24px;z-index:2;align-self:start;container-type:inline-size;margin-top:calc(-1 * clamp(220px,22vw,316px));background:var(--card);color:var(--ink);border:1px solid var(--card-border,color-mix(in oklch,var(--accent) 24%,var(--card)));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--gwe-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--gwe-shadow) l c h / .32)));padding:clamp(20px,3vw,32px);animation:gwe-rise .45s cubic-bezier(.2,.7,.2,1) .07s both}
.cf-gwe2.no-photo .gwe-card{margin-top:0}
.cf-gwe2 .gwe-card-title{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink)}
.cf-gwe2 .gwe-ends{margin-top:8px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-gwe2 .gwe-ends .gwe-inline{color:var(--accent)}
.cf-gwe2 .gwe-ends-date{white-space:nowrap;font-weight:800;color:var(--ink)}
.cf-gwe2 .gwe-counter{display:none;margin-top:20px;margin-bottom:10px;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--ink)}
.cf-gwe2 .gwe-steps{margin-top:24px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cf-gwe2 .gwe-step{position:relative;min-width:0}
.cf-gwe2 .gwe-step-btn{appearance:none;display:grid;gap:10px;width:100%;margin:0;padding:0;border:0;background:none;font:inherit;color:inherit;text-align:left;border-radius:6px}
.cf-gwe2 button.gwe-step-btn{cursor:pointer}
.cf-gwe2 button.gwe-step-btn:hover .gwe-step-text{text-decoration:underline;text-underline-offset:.18em}
.cf-gwe2 .gwe-step-bar{display:block;height:6px;border-radius:999px;background:color-mix(in oklch,var(--ink) 10%,var(--card));transition:background .16s ease}
.cf-gwe2 .is-done .gwe-step-bar,.cf-gwe2 .is-current .gwe-step-bar{background:var(--accent-fill,var(--accent))}
.cf-gwe2 .gwe-step-label{display:flex;align-items:center;gap:8px;min-width:0;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--muted)}
.cf-gwe2 .is-current .gwe-step-label,.cf-gwe2 .is-done .gwe-step-label{color:var(--ink)}
.cf-gwe2 .gwe-step-num{font-family:var(--font-display);font-variant-numeric:tabular-nums}
.cf-gwe2 .is-current .gwe-step-num{color:var(--accent)}
.cf-gwe2 .gwe-step-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cf-gwe2 .gwe-badge{display:inline-grid;place-items:center;flex:none;width:20px;height:20px;border-radius:999px;background:var(--success);color:var(--badge-glyph,#fff)}
.cf-gwe2 .gwe-badge.is-lg{width:28px;height:28px}
.cf-gwe2 .gwe-panel{margin-top:24px;animation:gwe-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-gwe2 .gwe-legend{display:block;width:100%;margin-bottom:16px;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;color:var(--ink);text-wrap:balance}
.cf-gwe2 .gwe-field{display:grid;gap:8px}
.cf-gwe2 .gwe-field+.gwe-field{margin-top:16px}
.cf-gwe2 .gwe-label{font-size:1.0625rem;line-height:1.3;font-weight:700;color:var(--label-ink,var(--ink))}
.cf-gwe2 .gwe-input{width:100%;height:56px;padding:0 16px;font:inherit;font-family:var(--font-body);font-size:1.0625rem;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));box-shadow:inset 0 1px 2px oklch(from var(--gwe-shadow) l c h / .08);outline:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-gwe2 .gwe-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-gwe2 .gwe-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink) 40%,transparent)}
.cf-gwe2 .gwe-input:focus{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-gwe2 .gwe-input[aria-invalid='true']{border-color:var(--danger)}
.cf-gwe2 .gwe-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-gwe2 .gwe-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--ink) 5%,var(--field))}
.cf-gwe2 .gwe-hint{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-gwe2 .gwe-error{font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
.cf-gwe2 .gwe-error-gap{margin-top:8px}
.cf-gwe2 .gwe-note{margin-top:16px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start;padding:14px 16px;border-radius:10px;animation:gwe-pop .3s ease both}
.cf-gwe2 .gwe-note.is-in{background:var(--success-soft)}
.cf-gwe2 .gwe-note.is-out{background:var(--warning-soft)}
.cf-gwe2 .gwe-note-title{font-size:1rem;line-height:1.3;font-weight:800}
.cf-gwe2 .is-in .gwe-note-title{color:var(--success)}
.cf-gwe2 .is-out .gwe-note-title,.cf-gwe2 .is-out .gwe-note-icon{color:var(--warning)}
.cf-gwe2 .gwe-note-icon{margin-top:1px}
.cf-gwe2 .gwe-note-text{margin-top:4px;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--ink);text-wrap:pretty}
.cf-gwe2 .gwe-summary{display:grid;gap:16px;padding:16px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-gwe2 .gwe-sum-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:2px}
.cf-gwe2 .gwe-sum-row dt{grid-column:1;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--muted)}
.cf-gwe2 .gwe-sum-row dd{grid-column:1;font-size:1rem;line-height:1.4;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.cf-gwe2 .gwe-sum-row .gwe-sum-edit{grid-column:2;grid-row:1 / span 3;align-self:center}
.cf-gwe2 .gwe-edit{appearance:none;border:0;background:none;margin:0;padding:6px 4px;font:inherit;font-size:.9375rem;font-weight:700;color:var(--ink);text-decoration:underline;text-decoration-color:oklch(from var(--ink) l c h / .45);text-underline-offset:.18em;cursor:pointer;border-radius:6px}
.cf-gwe2 .gwe-edit:hover{text-decoration-color:currentColor}
.cf-gwe2 .gwe-risk{margin-top:16px;font-size:1.0625rem;line-height:1.4;font-weight:800;color:var(--ink);text-wrap:pretty}
.cf-gwe2 .gwe-risk .gwe-badge{vertical-align:-0.25em;margin-inline-end:.5em}
.cf-gwe2 .gwe-agree{margin-top:12px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start;padding:16px;border-radius:10px;border:1px solid transparent;background:color-mix(in oklch,var(--ink) 4%,var(--card));cursor:pointer;transition:background .16s ease,border-color .16s ease}
.cf-gwe2 .gwe-agree:hover{background:color-mix(in oklch,var(--ink) 7%,var(--card))}
.cf-gwe2 .gwe-agree.is-on{background:color-mix(in oklch,var(--accent) 10%,var(--card));border-color:color-mix(in oklch,var(--accent) 36%,var(--card))}
.cf-gwe2 .gwe-agree.is-error{border-color:var(--danger)}
.cf-gwe2 .gwe-box{position:relative;display:grid;place-items:center;width:26px;height:26px;flex:none}
.cf-gwe2 .gwe-box input{appearance:none;-webkit-appearance:none;margin:0;width:26px;height:26px;border-radius:7px;border:2px solid color-mix(in oklch,var(--ink) 40%,var(--field));background:var(--field);cursor:pointer;transition:background .16s ease,border-color .16s ease}
.cf-gwe2 .gwe-box input:checked{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent))}
.cf-gwe2 .gwe-box input[aria-invalid='true']{border-color:var(--danger)}
.cf-gwe2 .gwe-box input:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-gwe2 .gwe-box input:disabled{cursor:not-allowed}
.cf-gwe2 .gwe-box-mark{position:absolute;inset:0;margin:auto;color:var(--accent-fill-ink,var(--card));opacity:0;transform:scale(.9);transition:opacity .16s ease,transform .16s ease;pointer-events:none}
.cf-gwe2 .gwe-box input:checked+.gwe-box-mark{opacity:1;transform:none}
.cf-gwe2 .gwe-agree-text{font-size:1rem;line-height:1.45;font-weight:500;color:var(--ink);text-wrap:pretty}
.cf-gwe2 .gwe-fail{margin-top:16px;padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-gwe2 .gwe-nav{margin-top:24px;display:flex;flex-direction:row-reverse;gap:12px}
.cf-gwe2 .gwe-primary,.cf-gwe2 .gwe-secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:0 28px;margin:0;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;white-space:nowrap;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-gwe2 .gwe-primary{flex:1 1 auto;min-width:0;border:0;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--gwe-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--gwe-shadow) l c h / .45))}
.cf-gwe2 .gwe-primary:hover:not(:disabled),.cf-gwe2 .gwe-primary.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--gwe-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--gwe-shadow) l c h / .5))}
.cf-gwe2 .gwe-primary:active:not(:disabled),.cf-gwe2 .gwe-primary.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .05) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 1px oklch(from var(--gwe-shadow) l c h / .3)}
.cf-gwe2 .gwe-primary:disabled{cursor:not-allowed;color:color-mix(in oklch,var(--secondary-ink) 72%,var(--secondary));text-shadow:none;background:var(--secondary);box-shadow:none}
.cf-gwe2 .gwe-form[aria-busy='true'] .gwe-primary{cursor:progress}
.cf-gwe2 .gwe-secondary{flex:none;color:var(--button-2-ink,var(--secondary-ink));background:var(--button-2-bg,var(--secondary));border:1px solid var(--button-2-border,transparent);box-shadow:var(--button-2-shadow,var(--shadow-sm))}
.cf-gwe2 .gwe-secondary:hover:not(:disabled){background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-gwe2 .gwe-secondary:active:not(:disabled){transform:translateY(1px);box-shadow:none}
.cf-gwe2 .gwe-secondary:disabled{cursor:not-allowed;color:var(--muted)}
.cf-gwe2 :is(.gwe-primary,.gwe-secondary,.gwe-edit,.gwe-step-btn,.gwe-link):focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-gwe2 .gwe-spin{animation:gwe-spin .8s linear infinite}
.cf-gwe2 .gwe-legal{margin-top:16px;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-align:center;text-wrap:pretty}
.cf-gwe2 .gwe-link{color:var(--link,var(--accent));font-weight:700;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em;border-radius:4px}
.cf-gwe2 .gwe-link:hover{color:oklch(from var(--link,var(--accent)) calc(l - .08) c h);text-decoration-color:currentColor}
.cf-gwe2 .gwe-more{grid-area:more;padding-top:clamp(40px,5vw,56px);display:grid;gap:clamp(32px,4vw,48px);animation:gwe-rise .45s cubic-bezier(.2,.7,.2,1) .14s both}
.cf-gwe2 .gwe-h3{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink)}
.cf-gwe2 .gwe-moments{margin-top:24px;display:grid;gap:24px}
.cf-gwe2 .gwe-moment{display:grid;grid-template-columns:64px minmax(0,1fr);gap:16px;align-items:start}
.cf-gwe2 .gwe-moment.no-spot{grid-template-columns:minmax(0,1fr)}
.cf-gwe2 .gwe-moment-body{padding-top:8px;min-width:0}
.cf-gwe2 .gwe-moment-title{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;color:var(--ink);text-wrap:balance}
.cf-gwe2 .gwe-moment-text{margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-gwe2 .gwe-area{padding:clamp(20px,3vw,28px);border-radius:var(--card-radius,var(--radius,14px));background:color-mix(in oklch,var(--ink) 4%,var(--surface))}
.cf-gwe2 .gwe-area-title{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;color:var(--ink);text-wrap:balance}
.cf-gwe2 .gwe-area-title .gwe-inline{color:var(--accent)}
.cf-gwe2 .gwe-chips{margin-top:16px;display:flex;flex-wrap:wrap;gap:8px}
.cf-gwe2 .gwe-chip{display:inline-flex;align-items:center;min-height:32px;padding:4px 12px;border-radius:999px;background:var(--card);border:1px solid oklch(from var(--ink) l c h / .12);font-size:.875rem;line-height:1.2;font-weight:800;color:var(--ink)}
.cf-gwe2 .gwe-area-text{margin-top:8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink);text-wrap:pretty}
@container (max-width:360px){.cf-gwe2 .gwe-nav{flex-direction:column}.cf-gwe2 .gwe-primary{padding:0 20px}.cf-gwe2 .gwe-secondary{min-height:48px}}
@container (max-width:240px){.cf-gwe2 .gwe-ends-date{white-space:normal}}
@media (max-width:900px){
.cf-gwe2 .gwe-hero{height:clamp(200px,52vw,380px)}
.cf-gwe2 .gwe-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:'intro' 'card' 'more'}
.cf-gwe2 .gwe-intro{padding-top:28px}
.cf-gwe2 .gwe-card,.cf-gwe2.no-photo .gwe-card{position:relative;top:auto;margin-top:28px;width:100%;max-width:600px}
.cf-gwe2 .gwe-more{padding-top:48px}
}
@media (max-width:520px){
.cf-gwe2 .gwe-counter{display:block}
.cf-gwe2 .gwe-steps{margin-top:0;gap:6px}
.cf-gwe2 .gwe-step-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.cf-gwe2 .gwe-moment{grid-template-columns:56px minmax(0,1fr)}
}
@keyframes gwe-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes gwe-pop{from{opacity:.82;transform:scale(.96)}to{opacity:1;transform:none}}
@keyframes gwe-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
.cf-gwe2 .gwe-intro,.cf-gwe2 .gwe-card,.cf-gwe2 .gwe-more,.cf-gwe2 .gwe-panel,.cf-gwe2 .gwe-note,.cf-gwe2 .gwe-spin{animation:none}
.cf-gwe2 :is(.gwe-primary,.gwe-secondary,.gwe-input,.gwe-agree,.gwe-box input,.gwe-box-mark,.gwe-step-bar){transition:none}
}
`;
pieces/forms/giveaway-entry-2/specimen.tsx 71 lines
import __studioImage8e96da1a from "../assets/1cf887ee32eab19e.webp";
import React from 'react';
import GiveawayEntry2, { type GiveawayEntry2Props } from '../giveaway-entry-2';
import { slot } from '../../slots';
import calendar from '../../fx/spots/calendar';
import clock from '../../fx/spots/clock';
import community from '../../fx/spots/community';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
const SERVICE_AREA = [
{ zip: '80202', place: 'Denver' },
{ zip: '80203', place: 'Denver' },
{ zip: '80204', place: 'Denver' },
{ zip: '80205', place: 'Denver' },
{ zip: '80206', place: 'Denver' },
{ zip: '80207', place: 'Denver' },
{ zip: '80209', place: 'Denver' },
{ zip: '80210', place: 'Denver' },
{ zip: '80211', place: 'Denver' },
{ zip: '80212', place: 'Denver' },
{ zip: '80218', place: 'Denver' },
{ zip: '80219', place: 'Denver' },
{ zip: '80220', place: 'Denver' },
{ zip: '80223', place: 'Denver' },
{ zip: '80224', place: 'Denver' },
{ zip: '80010', place: 'Aurora' },
{ zip: '80011', place: 'Aurora' },
{ zip: '80012', place: 'Aurora' },
{ zip: '80014', place: 'Aurora' },
{ zip: '80214', place: 'Lakewood' },
{ zip: '80226', place: 'Lakewood' },
{ zip: '80227', place: 'Lakewood' },
{ zip: '80228', place: 'Lakewood' },
{ zip: '80110', place: 'Englewood' },
{ zip: '80113', place: 'Englewood' },
{ zip: '80120', place: 'Littleton' },
{ zip: '80122', place: 'Littleton' },
{ zip: '80123', place: 'Littleton' },
];
export default function GiveawayEntry2Specimen({ state = 'default' }: { state?: GiveawayEntry2Props['state'] }) {
return (
<GiveawayEntry2
state={state}
headline='Win a free garden makeover. Picture it in your yard by June.'
highlight='Picture it in your yard by June.'
lead='Enter free for a garden makeover designed and planted by Greenway Landscaping. Three quick steps, and this could be your yard this summer.'
photo={slot('scene', __studioImage8e96da1a)}
photoAlt='A finished backyard garden with a flagstone path, full planting beds and a small stone patio in early summer light'
photoPosition='30% 60%'
moments={[
{ title: 'June evenings outside', text: 'Dinner in the garden while the sun drops behind the foothills.', spot: calendar },
{ title: 'Weekends back', text: 'Less time fighting the yard. More time enjoying it.', spot: clock },
{ title: 'The yard on the block', text: 'The one your neighbors slow down to look at.', spot: community },
]}
serviceArea={SERVICE_AREA}
endsAt='2027-04-30T23:59:00-06:00'
timeZone='America/Denver'
locale='en-US'
rulesHref='#official-rules'
copy={{
zipPlaceholder: '80210',
areaHeading: 'Open to homes across the Denver area',
riskLead: 'Free to enter. No purchase necessary. One entry per household.',
agreeBefore: 'I’m 18 or older, the yard is in Greenway’s service area, and I agree to the',
legal: 'No purchase necessary. Open to Denver-area residents 18 and older. Void where prohibited.',
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
sponsorLine OptionalGiveawayEntry2 |
string |
|
headline OptionalGiveawayEntry2 |
React.ReactNode |
|
highlight OptionalGiveawayEntry2 |
string |
|
lead OptionalGiveawayEntry2 |
React.ReactNode |
|
photo OptionalGiveawayEntry2 |
string |
|
photoAlt OptionalGiveawayEntry2 |
string |
|
photoPosition OptionalGiveawayEntry2 |
string |
|
moments OptionalGiveawayEntry2 |
GiveawayMoment[] |
|
serviceArea OptionalGiveawayEntry2 |
ServiceAreaZip[] |
|
serviceAreaLabel OptionalGiveawayEntry2 |
string |
|
allowOutsideArea OptionalGiveawayEntry2 |
boolean |
|
endsAt OptionalGiveawayEntry2 |
string |
|
timeZone OptionalGiveawayEntry2 |
string |
|
locale OptionalGiveawayEntry2 |
string |
|
rulesHref OptionalGiveawayEntry2 |
string |
|
headingLevel OptionalGiveawayEntry2 |
'h1' | 'h2' |
|
initialValues OptionalGiveawayEntry2 |
Partial<GiveawayEntry2Answers> |
|
copy OptionalGiveawayEntry2 |
Partial<GiveawayEntry2Copy> |
|
onSubmit OptionalGiveawayEntry2 |
(values: GiveawayEntry2Values) => void | boolean | Promise<void | boolean> |
|
state OptionalGiveawayEntry2 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalGiveawayEntry2 |
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-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
1cf887ee32eab19e.webp
image/webp · 360 KB
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
7c36d7f4dd4ae594.webp
image/webp · 26.5 KB