Referral Share 5
Donation thank-you share ask: the giver's reasons scroll beside a sticky panel of fanned, ready-written messages;
Use it in a prompt
Use checkout/referral-share-5 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/checkout/referral-share-5.tsx. - Import it and pass your copy and images (Props tab):
import { ReferralShare5 } from "@/components/funneldna/checkout/referral-share-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/referral-share-5/component.tsx 853 lines
// layout: sticky-offer-side
// Donation thank-you share ask: the giver's reasons scroll beside a sticky panel of fanned, ready-written messages;
// the chosen card fills the email, text and copy, so one friend hears about the mission from someone they trust.
import * as React from 'react'
import { Check, ChevronLeft, ChevronRight, CircleAlert, Link2, Mail, MapPin, MessageSquare, Pencil } from 'lucide-react'
import { FX_HOST, Pattern, Spot } from '../fx/fx'
import community from '../fx/spots/community'
import phone from '../fx/spots/phone'
import shield from '../fx/spots/shield'
export type ReferralShare5Channel = 'email' | 'sms' | 'copy'
export type ReferralShare5Message = {
/** Short tone tag shown on the card, e.g. Short and warm. */
tone: string
/** The ready-written message; {cause} is replaced with the cause name. The link is added after it. */
text: string
}
export type ReferralShare5Point = {
/** Bold lead-in that opens the paragraph. */
lead: string
text: string
/** Spot illustration asset imported from fx/spots; omit for none. */
spot?: string
}
export type ReferralShare5Impact = {
/** A supplied figure only. Never invent impact numbers. */
value: string
label: string
}
export type ReferralShare5Payload = {
/** Index of the chosen message card. */
index: number
/** The chosen message as edited, without the link. */
message: string
link: string
/** Exactly what is sent or copied: the message plus the link. */
text: string
/** The mailto: or sms: address for email and text shares. */
href?: string
}
export type ReferralShare5Copy = {
pickHeading: string
pickLead: string
/** Accessible name of the card fan. */
fanLabel: string
/** Card counter; {index} and {total} are replaced. */
counter: string
/** Screen-reader line when a card comes to the top; {index}, {total} and {tone} are replaced. */
announce: string
prevLabel: string
nextLabel: string
/** Dot label; {index} is replaced. */
dotLabel: string
editLabel: string
doneLabel: string
fieldLabel: string
fieldPlaceholder: string
emptyError: string
/** Shown on a card whose message was cleared. */
emptyCard: string
/** Link line on each card; {link} is the link without https://. */
linkLine: string
channels: Record<ReferralShare5Channel, string>
/** Subject line for the email share. */
emailSubject: string
copiedLabel: string
copiedAnnounce: string
copyError: string
manualLabel: string
/** Quiet line under the buttons; empty hides it. */
note: string
}
export type ReferralShare5Props = {
/** Short line above the headline. */
preHeadline?: React.ReactNode
/** The ask; wrap one phrase in <span className='rs5-mark'> for the marker stroke. */
headline?: React.ReactNode
/** 1 when this block opens the page. */
headingLevel?: 1 | 2
lead?: React.ReactNode
/** Cause or organisation name used in {cause}. */
cause?: string
/** The page the friend should visit; added after the message. */
link?: string
/** Ready-written share messages, fanned as cards; editable. */
messages?: ReferralShare5Message[]
/** Photo of the work the gift funds (slot: scene). */
sceneImage?: string
sceneImageAlt?: string
/** Plain caption under the photo. */
photoCaption?: React.ReactNode
/** Bold lead-in paragraphs under the photo. */
points?: ReferralShare5Point[]
/** Supplied impact figures only; hidden when empty. */
impact?: ReferralShare5Impact[]
/** Share buttons in order; the first is the main button. */
channels?: ReferralShare5Channel[]
/** Which message starts on top. */
initialIndex?: number
copy?: Partial<Omit<ReferralShare5Copy, 'channels'>> & {
channels?: Partial<Record<ReferralShare5Channel, string>>
}
/** Called when the visitor emails, texts or copies the chosen message. Email and text then open the visitor's own app. */
onAction?: (channel: ReferralShare5Channel, payload: ReferralShare5Payload) => void
/** Called when a different message comes to the top. */
onSelect?: (index: number) => void
onMessageChange?: (index: number, message: string) => void
disabled?: boolean
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
className?: string
}
export function ReferralShare5(props: ReferralShare5Props) {
const {
preHeadline = DEFAULT_PRE,
headline = DEFAULT_HEADLINE,
headingLevel = 2,
lead = DEFAULT_LEAD,
cause = 'this cause',
link = '',
messages,
sceneImage,
sceneImageAlt = '',
photoCaption,
points = DEFAULT_POINTS,
impact = [],
channels,
initialIndex = 0,
onAction,
onSelect,
onMessageChange,
state = 'default',
className,
} = props
const custom = props.copy || {}
const copy: ReferralShare5Copy = {
...DEFAULT_COPY,
...custom,
channels: { ...DEFAULT_COPY.channels, ...(custom.channels || {}) },
}
const source = messages && messages.length > 0 ? messages : DEFAULT_MESSAGES
const list = source.map((m) => ({ tone: m.tone, text: fill(m.text, { cause }) }))
const n = list.length
const listKey = list.map((m) => m.tone + '|' + m.text).join('||')
const start = wrap(initialIndex, n)
const disabled = Boolean(props.disabled) || state === 'disabled'
const cleanLink = link.trim()
const shownLink = stripProtocol(cleanLink)
const order = channels && channels.length > 0 ? channels : DEFAULT_CHANNELS
const Heading: 'h1' | 'h2' = headingLevel === 1 ? 'h1' : 'h2'
const uid = React.useId().split(':').join('')
const headId = 'rs5' + uid + '-head'
const pickId = 'rs5' + uid + '-pick'
const hintId = 'rs5' + uid + '-hint'
const fieldId = 'rs5' + uid + '-field'
const errId = 'rs5' + uid + '-err'
const manualId = 'rs5' + uid + '-manual'
const [active, setActive] = React.useState(start)
const [drafts, setDrafts] = React.useState<string[]>(() => startDrafts(list, start, state))
const [editing, setEditing] = React.useState(state === 'error')
const [touched, setTouched] = React.useState(state === 'error')
const [copyStatus, setCopyStatus] = React.useState<'idle' | 'copied' | 'error'>('idle')
const editorRef = React.useRef<HTMLTextAreaElement>(null)
const manualRef = React.useRef<HTMLTextAreaElement>(null)
const focusEditor = React.useRef(false)
const swipe = React.useRef<{ x: number; y: number } | null>(null)
const swiped = React.useRef(false)
const timer = React.useRef<number | null>(null)
React.useEffect(() => {
setActive(start)
setDrafts(startDrafts(list, start, state))
setEditing(state === 'error')
setTouched(state === 'error')
setCopyStatus('idle')
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [listKey, start, state])
React.useEffect(() => {
return () => {
if (timer.current !== null) window.clearTimeout(timer.current)
}
}, [])
React.useEffect(() => {
const el = editorRef.current
if (editing && focusEditor.current && el) {
focusEditor.current = false
el.focus()
el.setSelectionRange(el.value.length, el.value.length)
}
}, [editing, active])
React.useEffect(() => {
const el = manualRef.current
if (copyStatus === 'error' && el) {
el.focus()
el.select()
}
}, [copyStatus])
const idx = wrap(active, n)
const textAt = (i: number) => (drafts[i] !== undefined ? drafts[i] : list[i] ? list[i].text : '')
const draft = textAt(idx)
const trimmed = draft.trim()
const empty = trimmed === ''
const showError = empty && touched && !disabled
const shareText = cleanLink ? (trimmed ? trimmed + ' ' + cleanLink : cleanLink) : trimmed
const emailHref = 'mailto:?subject=' + encodeURIComponent(copy.emailSubject) + '&body=' + encodeURIComponent(shareText)
const smsHref = 'sms:?&body=' + encodeURIComponent(shareText)
const copied = !disabled && (state === 'success' || copyStatus === 'copied')
const copyFailed = !disabled && copyStatus === 'error'
const live = copied
? copy.copiedAnnounce
: list[idx]
? fill(copy.announce, { index: idx + 1, total: n, tone: list[idx].tone })
: ''
function pick(i: number) {
if (disabled || n < 2) return
const next = wrap(i, n)
if (next === idx) return
setActive(next)
setEditing(false)
setTouched(false)
setCopyStatus('idle')
if (onSelect) onSelect(next)
}
function handleKey(event: React.KeyboardEvent<HTMLDivElement>) {
if (event.target !== event.currentTarget || disabled) return
let next: number | null = null
if (event.key === 'ArrowRight' || event.key === 'ArrowDown') next = idx + 1
else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') next = idx - 1
else if (event.key === 'Home') next = 0
else if (event.key === 'End') next = n - 1
if (next === null) return
event.preventDefault()
pick(next)
}
function handlePointerDown(event: React.PointerEvent<HTMLDivElement>) {
swiped.current = false
swipe.current = null
if (disabled || editing) return
const target = event.target
if (target instanceof Element && target.closest('button, textarea, a')) return
swipe.current = { x: event.clientX, y: event.clientY }
}
function handlePointerUp(event: React.PointerEvent<HTMLDivElement>) {
const s = swipe.current
swipe.current = null
if (!s) return
const dx = event.clientX - s.x
const dy = event.clientY - s.y
if (Math.abs(dx) > 40 && Math.abs(dx) > Math.abs(dy)) {
swiped.current = true
pick(idx + (dx < 0 ? 1 : -1))
}
}
function handleCardTap(i: number) {
if (swiped.current) {
swiped.current = false
return
}
pick(i)
}
function toggleEdit() {
if (disabled) return
if (editing) {
if (empty) {
setTouched(true)
if (editorRef.current) editorRef.current.focus()
return
}
setEditing(false)
return
}
focusEditor.current = true
setEditing(true)
}
function handleDraft(event: React.ChangeEvent<HTMLTextAreaElement>) {
const value = event.target.value
setDrafts((prev) => {
const next = list.map((m, i) => (prev[i] !== undefined ? prev[i] : m.text))
next[idx] = value
return next
})
if (copyStatus !== 'idle') setCopyStatus('idle')
if (onMessageChange) onMessageChange(idx, value)
}
function guard(event: React.SyntheticEvent): boolean {
if (disabled) {
event.preventDefault()
return false
}
if (empty) {
event.preventDefault()
setTouched(true)
if (editing) {
if (editorRef.current) editorRef.current.focus()
} else {
focusEditor.current = true
setEditing(true)
}
return false
}
return true
}
function payload(href?: string): ReferralShare5Payload {
return { index: idx, message: trimmed, link: cleanLink, text: shareText, href }
}
function handleShare(event: React.MouseEvent<HTMLAnchorElement>, channel: ReferralShare5Channel, href: string) {
if (!guard(event)) return
if (onAction) onAction(channel, payload(href))
}
async function handleCopy(event: React.MouseEvent<HTMLButtonElement>) {
if (!guard(event)) return
const button = event.currentTarget
const text = shareText
let ok = false
try {
if (typeof navigator !== 'undefined' && navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(text)
ok = true
}
} catch {
ok = false
}
if (!ok) ok = legacyCopy(text, button)
if (timer.current !== null) window.clearTimeout(timer.current)
if (ok) {
setCopyStatus('copied')
if (onAction) onAction('copy', payload())
timer.current = window.setTimeout(() => setCopyStatus('idle'), 2400)
} else {
setCopyStatus('error')
}
}
function renderChannel(channel: ReferralShare5Channel, main: boolean) {
const Icon = channel === 'email' ? Mail : channel === 'sms' ? MessageSquare : copied ? Check : Link2
const label = channel === 'copy' && copied ? copy.copiedLabel : copy.channels[channel]
const cls = [
'rs5-btn',
main ? 'rs5-primary' : 'rs5-secondary',
main && state === 'hover' ? 'is-hover' : '',
main && state === 'active' ? 'is-active' : '',
channel === 'copy' && copied ? 'is-copied' : '',
disabled ? 'is-off' : '',
]
.filter(Boolean)
.join(' ')
const inner = (
<>
<Icon size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{label}</span>
</>
)
const describedBy = showError ? errId : undefined
if (channel === 'copy') {
return (
<button key={channel} type='button' className={cls} onClick={handleCopy} disabled={disabled} aria-describedby={describedBy}>
{inner}
</button>
)
}
if (disabled) {
return (
<a key={channel} className={cls} role='link' aria-disabled='true'>
{inner}
</a>
)
}
const href = channel === 'email' ? emailHref : smsHref
return (
<a key={channel} className={cls} href={href} onClick={(e) => handleShare(e, channel, href)} aria-describedby={describedBy}>
{inner}
</a>
)
}
function renderCard(m: { tone: string; text: string }, i: number) {
const pos = cardPos(i, idx, n)
const text = textAt(i).trim()
const top = (
<div className='rs5-card-top'>
<span className='rs5-tone'>{m.tone}</span>
<span className='rs5-count'>{fill(copy.counter, { index: i + 1, total: n })}</span>
</div>
)
const linkLine = cleanLink ? (
<p className='rs5-linkline'>
<Link2 size={16} strokeWidth={2.5} aria-hidden='true' />
{fill(copy.linkLine, { link: shownLink })}
</p>
) : (
<span className='rs5-linkline' />
)
const body = <p className='rs5-msg'>{text || <span className='rs5-msg-empty'>{copy.emptyCard}</span>}</p>
if (pos !== 'front') {
return (
<div key={i} className='rs5-card' data-pos={pos} aria-hidden='true' onClick={() => handleCardTap(i)}>
{top}
{body}
<div className='rs5-card-foot'>
{linkLine}
<span className='rs5-editbtn'>
<Pencil size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.editLabel}
</span>
</div>
</div>
)
}
return (
<div key={i} className='rs5-card' data-pos='front'>
{top}
{editing ? (
<div className='rs5-edit'>
<label className='rs5-label' htmlFor={fieldId}>
{copy.fieldLabel}
</label>
<textarea
id={fieldId}
ref={editorRef}
className='rs5-field'
value={draft}
onChange={handleDraft}
onBlur={() => {
if (empty) setTouched(true)
}}
placeholder={copy.fieldPlaceholder}
rows={5}
disabled={disabled}
aria-invalid={showError || undefined}
aria-describedby={showError ? errId : undefined}
/>
</div>
) : (
body
)}
{showError ? (
<p id={errId} className='rs5-error'>
<CircleAlert size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.emptyError}
</p>
) : null}
<div className='rs5-card-foot'>
{linkLine}
<button type='button' className='rs5-editbtn' onClick={toggleEdit} aria-pressed={editing} disabled={disabled}>
<Pencil size={16} strokeWidth={2.5} aria-hidden='true' />
{editing ? copy.doneLabel : copy.editLabel}
</button>
</div>
</div>
)
}
const rootClass = ['cf-referral-share-5', disabled ? 'is-disabled' : '', className || ''].filter(Boolean).join(' ')
const hasStory = points.length > 0 || impact.length > 0
return (
<section className={rootClass} aria-labelledby={headId} style={{ ...FX_HOST, overflow: 'clip' }}>
<div className='rs5-fx' aria-hidden='true'>
<Pattern name='waves' fade='edges' />
</div>
<style>{CSS}</style>
<div className='rs5-wrap'>
<header className='rs5-head'>
{preHeadline ? <p className='rs5-pre'>{preHeadline}</p> : null}
<Heading id={headId} className='rs5-title'>
{headline}
</Heading>
{lead ? <p className='rs5-lead'>{lead}</p> : null}
</header>
{sceneImage ? (
<figure className='rs5-photo'>
<img src={sceneImage} alt={sceneImageAlt} width={1200} height={900} decoding='async' />
{photoCaption ? (
<figcaption>
<MapPin size={16} strokeWidth={2.5} aria-hidden='true' />
{photoCaption}
</figcaption>
) : null}
</figure>
) : null}
<div className='rs5-panel' role='group' aria-labelledby={pickId}>
<h3 id={pickId} className='rs5-pick'>
{copy.pickHeading}
</h3>
<p id={hintId} className='rs5-hint'>
{copy.pickLead}
</p>
<div
className='rs5-fan'
role='group'
aria-roledescription='carousel'
aria-label={copy.fanLabel}
aria-describedby={hintId}
tabIndex={disabled ? -1 : 0}
onKeyDown={handleKey}
onPointerDown={handlePointerDown}
onPointerUp={handlePointerUp}
onPointerCancel={() => {
swipe.current = null
}}
>
{list.map(renderCard)}
</div>
{n > 1 ? (
<div className='rs5-controls'>
<button type='button' className='rs5-chev' onClick={() => pick(idx - 1)} aria-label={copy.prevLabel} disabled={disabled}>
<ChevronLeft size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
<div className='rs5-dots'>
{list.map((m, i) => (
<button
key={i}
type='button'
className='rs5-dot'
aria-label={fill(copy.dotLabel, { index: i + 1 })}
aria-current={i === idx ? 'true' : undefined}
onClick={() => pick(i)}
disabled={disabled}
>
<span />
</button>
))}
</div>
<button type='button' className='rs5-chev' onClick={() => pick(idx + 1)} aria-label={copy.nextLabel} disabled={disabled}>
<ChevronRight size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
</div>
) : null}
<div className='rs5-actions'>
{renderChannel(order[0], true)}
{order.slice(1).map((c) => renderChannel(c, false))}
{copy.note ? <p className='rs5-note'>{copy.note}</p> : null}
</div>
{copyFailed ? (
<div className='rs5-notice' role='alert'>
<p className='rs5-notice-text'>
<CircleAlert size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.copyError}
</p>
<label className='rs5-label' htmlFor={manualId}>
{copy.manualLabel}
</label>
<textarea
id={manualId}
ref={manualRef}
className='rs5-field rs5-manual'
value={shareText}
placeholder={copy.fieldPlaceholder}
readOnly
rows={4}
/>
</div>
) : null}
<p className='rs5-sr' aria-live='polite'>
{live}
</p>
</div>
{hasStory ? (
<div className='rs5-story'>
{points.length > 0 ? (
<ul className='rs5-points'>
{points.map((p, i) => (
<li key={i} className={'rs5-point' + (p.spot ? '' : ' is-plain')}>
{p.spot ? (
<span className='rs5-spot'>
<Spot src={p.spot} size={56} />
</span>
) : null}
<p>
<strong>{p.lead}</strong> {p.text}
</p>
</li>
))}
</ul>
) : null}
{impact.length > 0 ? (
<ul className='rs5-impact'>
{impact.map((f, i) => (
<li key={i}>
<span className='rs5-impact-value'>{f.value}</span>
<span className='rs5-impact-label'>{f.label}</span>
</li>
))}
</ul>
) : null}
</div>
) : null}
</div>
</section>
)
}
export default ReferralShare5
const DEFAULT_PRE = 'You just helped.'
const DEFAULT_HEADLINE = (
<>
Will you tell <span className='rs5-mark'>one friend</span>?
</>
)
const DEFAULT_LEAD = 'Your gift is already at work. One message from you is how the next person hears about it.'
const DEFAULT_CHANNELS: ReferralShare5Channel[] = ['email', 'sms', 'copy']
const DEFAULT_MESSAGES: ReferralShare5Message[] = [
{ tone: 'Short and warm', text: 'I just gave to {cause} and thought of you right away. Take a look:' },
{ tone: 'Why I gave', text: 'I did one good thing today: I gave to {cause}. If it matters to you too, this is where I gave:' },
{ tone: 'Straight ask', text: 'Will you join me? I just gave to {cause}, and I’m asking one friend to look. That’s you:' },
]
const DEFAULT_POINTS: ReferralShare5Point[] = [
{
lead: 'Your friends listen to you.',
text: 'They’ll scroll past an ad. They won’t scroll past a note from someone they know.',
spot: community,
},
{
lead: 'One message is enough.',
text: 'Pick the words that sound like you, send them to one person, and you’re done.',
spot: phone,
},
{
lead: 'No reward. No strings.',
text: 'There’s nothing in it for you except knowing one more person heard about this.',
spot: shield,
},
]
const DEFAULT_COPY: ReferralShare5Copy = {
pickHeading: 'Pick the words that sound like you',
pickLead: 'Swipe or tap the cards. Your pick fills the buttons below.',
fanLabel: 'Ready-written messages',
counter: '{index} of {total}',
announce: 'Message {index} of {total}: {tone}',
prevLabel: 'Previous message',
nextLabel: 'Next message',
dotLabel: 'Show message {index}',
editLabel: 'Edit',
doneLabel: 'Done',
fieldLabel: 'Your message',
fieldPlaceholder: 'Write a line or two to your friend…',
emptyError: 'Add a few words so your friend knows why you’re sharing.',
emptyCard: 'This message is empty. Tap Edit to write your own.',
linkLine: 'Sends with your link: {link}',
channels: { email: 'Email one friend', sms: 'Text a friend', copy: 'Copy message' },
emailSubject: 'Thought you’d want to see this',
copiedLabel: 'Copied',
copiedAnnounce: 'Message and link copied.',
copyError: 'We couldn’t copy that automatically. Select the message below and copy it.',
manualLabel: 'Your message and link',
note: 'Or just tell them about it the next time you talk.',
}
function fill(template: string, vars: Record<string, string | number>): string {
return Object.keys(vars).reduce((out, key) => out.split('{' + key + '}').join(String(vars[key])), template)
}
function wrap(i: number, n: number): number {
if (n <= 0) return 0
return ((Math.round(i) % n) + n) % n
}
function stripProtocol(value: string): string {
let out = value
const lower = out.toLowerCase()
if (lower.startsWith('https://')) out = out.slice(8)
else if (lower.startsWith('http://')) out = out.slice(7)
if (out.endsWith('/')) out = out.slice(0, -1)
return out
}
function startDrafts(list: { text: string }[], start: number, state: ReferralShare5Props['state']): string[] {
const drafts = list.map((m) => m.text)
if (state === 'error' && drafts.length > 0) drafts[start] = ''
return drafts
}
function cardPos(i: number, idx: number, n: number): 'front' | 'next' | 'prev' | 'rest' {
const offset = (i - idx + n) % n
if (offset === 0) return 'front'
if (offset === 1) return 'next'
if (n > 2 && offset === n - 1) return 'prev'
return 'rest'
}
function legacyCopy(text: string, restore: HTMLElement | null): boolean {
if (typeof document === 'undefined') return false
const area = document.createElement('textarea')
area.value = text
area.setAttribute('readonly', '')
area.style.position = 'fixed'
area.style.top = '0'
area.style.left = '0'
area.style.opacity = '0'
document.body.appendChild(area)
area.select()
let ok = false
try {
ok = document.execCommand('copy')
} catch {
ok = false
}
document.body.removeChild(area)
if (restore) restore.focus()
return ok
}
const CSS = `
.cf-referral-share-5{--rs5-ease:cubic-bezier(.2,.7,.2,1);--rs5-shadow:var(--shadow, oklch(0.22 0.03 260));--rs5-marker:color-mix(in oklch, var(--marker, #fae37c) 82%, transparent);--rs5-focus:oklch(from var(--field-focus, var(--accent, #2563eb)) l c h / 0.5);position:relative;background:var(--surface, #ffffff);color:var(--ink, #101828);font-family:var(--font-body, system-ui, sans-serif);padding:clamp(56px, 8vw, 112px) 0 clamp(64px, 8.5vw, 120px)}
.cf-referral-share-5 *,.cf-referral-share-5 *::before,.cf-referral-share-5 *::after{box-sizing:border-box}
.cf-referral-share-5 .rs5-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto;padding-inline:clamp(16px, 5vw, 48px);display:grid;grid-template-columns:minmax(0, 1fr);grid-template-areas:'head' 'photo' 'share' 'story';row-gap:32px}
.cf-referral-share-5 .rs5-head{grid-area:head;min-width:0;animation:rs5-rise .45s var(--rs5-ease) both}
.cf-referral-share-5 .rs5-pre{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight, 800);font-size:clamp(1.125rem, 1.5vw, 1.375rem);line-height:1.3;color:var(--accent, #2563eb)}
.cf-referral-share-5 .rs5-title{margin:calc(16px + 0.25em) 0 calc(16px + 0.3em);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(2.5rem, 5.4vw, 4.875rem);line-height:1.1;color:var(--ink, #101828);text-wrap:balance}
.cf-referral-share-5 .rs5-mark{background-image:linear-gradient(transparent 56%, var(--rs5-marker) 56%, var(--rs5-marker) 92%, transparent 92%);padding:0 .08em;margin:0 -.04em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-referral-share-5 .rs5-lead{margin:0;max-width:38rem;font-size:clamp(1.125rem, 1.5vw, 1.375rem);line-height:1.4;font-weight:500;color:var(--muted, #475467);text-wrap:pretty}
.cf-referral-share-5 .rs5-photo{grid-area:photo;margin:0;min-width:0;animation:rs5-rise .45s var(--rs5-ease) .07s both}
.cf-referral-share-5 .rs5-photo img{display:block;width:100%;height:clamp(180px, 48vw, 280px);object-fit:cover;object-position:50% 60%;border-radius:12px;background:color-mix(in oklch, var(--ink, #101828) 6%, var(--surface, #ffffff))}
.cf-referral-share-5 .rs5-photo figcaption{margin-top:12px;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted, #475467);text-wrap:pretty}
.cf-referral-share-5 .rs5-photo figcaption svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;color:var(--accent, #2563eb)}
.cf-referral-share-5 .rs5-fx{display:none}
.cf-referral-share-5 .rs5-panel{grid-area:share;position:relative;min-width:0;background:var(--band, #1b2a4a);color:var(--band-ink, #ffffff);border:1px solid oklch(from var(--band-ink, #ffffff) l c h / 0.1);border-radius:var(--card-radius, var(--radius, 14px));padding:clamp(20px, 3vw, 32px);box-shadow:inset 0 1px 0 oklch(from var(--band-ink, #ffffff) l c h / 0.08), var(--shadow-lg, 0 2px 4px oklch(from var(--rs5-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--rs5-shadow) l c h / 0.32));animation:rs5-rise .45s var(--rs5-ease) .14s both}
.cf-referral-share-5 .rs5-pick{margin:0 0 8px;font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);font-size:clamp(1.3125rem, 1.8vw, 1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--band-ink, #ffffff);text-wrap:balance}
.cf-referral-share-5 .rs5-hint{margin:0;font-size:15px;line-height:1.4;font-weight:500;color:var(--band-ink, #ffffff);text-wrap:pretty}
.cf-referral-share-5 .rs5-fan{display:grid;margin-top:20px;padding:6px 22px 24px;border-radius:var(--radius, 12px);touch-action:pan-y;outline:none}
.cf-referral-share-5 .rs5-fan:focus-visible{outline:3px solid var(--band-ink, #ffffff);outline-offset:2px}
.cf-referral-share-5 .rs5-card{grid-area:1 / 1;position:relative;display:flex;flex-direction:column;gap:16px;min-width:0;padding:clamp(20px, 2.4vw, 24px);background:var(--card, #ffffff);color:var(--ink, #101828);border:1px solid var(--card-border, oklch(from var(--ink, #101828) l c h / 0.12));border-radius:var(--card-radius, var(--radius, 14px));box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(from var(--rs5-shadow) l c h / 0.22), 0 4px 10px -2px oklch(from var(--rs5-shadow) l c h / 0.2)));transform-origin:50% 100%;transition:transform .38s var(--rs5-ease), opacity .3s ease, box-shadow .3s ease, visibility 0s linear 0s}
.cf-referral-share-5 .rs5-card[data-pos='front']{z-index:3;box-shadow:var(--shadow-lg, 0 2px 4px oklch(from var(--rs5-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--rs5-shadow) l c h / 0.32));border-color:color-mix(in oklch, var(--accent, #2563eb) 40%, var(--card, #ffffff))}
.cf-referral-share-5 .rs5-card[data-pos='next']{z-index:2;cursor:pointer;background:color-mix(in oklch, var(--ink, #101828) 4%, var(--card, #ffffff));transform:translate(18px, 8px) rotate(3.5deg) scale(0.96)}
.cf-referral-share-5 .rs5-card[data-pos='prev']{z-index:1;cursor:pointer;background:color-mix(in oklch, var(--ink, #101828) 6%, var(--card, #ffffff));transform:translate(-18px, 12px) rotate(-3.5deg) scale(0.93)}
.cf-referral-share-5 .rs5-card[data-pos='rest']{z-index:0;opacity:0;visibility:hidden;pointer-events:none;transform:scale(0.9);transition:transform .38s var(--rs5-ease), opacity .3s ease, visibility 0s linear .3s}
.cf-referral-share-5.is-disabled .rs5-card[data-pos='next'],.cf-referral-share-5.is-disabled .rs5-card[data-pos='prev']{cursor:not-allowed}
.cf-referral-share-5 .rs5-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.cf-referral-share-5 .rs5-tone{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch, var(--ink, #101828) 6%, var(--card, #ffffff));color:var(--ink, #101828);font-size:14px;line-height:1.2;font-weight:800}
.cf-referral-share-5 .rs5-count{font-size:14px;line-height:1.2;font-weight:700;color:var(--muted, #475467);font-variant-numeric:tabular-nums}
.cf-referral-share-5 .rs5-msg{margin:0;flex:1 1 auto;font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.5;font-weight:500;color:var(--ink, #101828);white-space:pre-line;overflow-wrap:anywhere;text-wrap:pretty}
.cf-referral-share-5 .rs5-msg-empty{color:var(--muted, #475467)}
.cf-referral-share-5 .rs5-card-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:12px;border-top:1px solid oklch(from var(--ink, #101828) l c h / 0.12)}
.cf-referral-share-5 .rs5-linkline{margin:0;flex:1 1 160px;min-width:0;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted, #475467);overflow-wrap:anywhere}
.cf-referral-share-5 .rs5-linkline svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-referral-share-5 .rs5-editbtn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid oklch(from var(--ink, #101828) l c h / 0.14);background:color-mix(in oklch, var(--ink, #101828) 5%, var(--card, #ffffff));color:var(--ink, #101828);font-family:var(--font-body);font-size:15px;line-height:1.2;font-weight:700;cursor:pointer;transition:background .16s ease, transform .16s ease}
.cf-referral-share-5 .rs5-card[data-pos='front'] .rs5-editbtn:hover:not(:disabled){background:color-mix(in oklch, var(--ink, #101828) 10%, var(--card, #ffffff))}
.cf-referral-share-5 .rs5-card[data-pos='front'] .rs5-editbtn:active:not(:disabled){transform:translateY(1px)}
.cf-referral-share-5 .rs5-editbtn[aria-pressed='true']{background:color-mix(in oklch, var(--accent, #2563eb) 12%, var(--card, #ffffff));border-color:color-mix(in oklch, var(--accent, #2563eb) 45%, var(--card, #ffffff))}
.cf-referral-share-5 .rs5-editbtn:focus-visible{outline:3px solid var(--rs5-focus);outline-offset:2px}
.cf-referral-share-5 .rs5-editbtn:disabled{opacity:.55;cursor:not-allowed}
.cf-referral-share-5 .rs5-edit{display:block}
.cf-referral-share-5 .rs5-label{display:block;margin:0 0 8px;font-size:16px;line-height:1.3;font-weight:700;color:var(--label-ink, var(--ink, #101828))}
.cf-referral-share-5 .rs5-field{display:block;width:100%;min-height:132px;resize:vertical;margin:0;padding:12px 14px;font-family:var(--font-body);font-size:17px;line-height:1.5;color:var(--field-ink, #101828);background:var(--field, #ffffff);border:1px solid var(--field-border, color-mix(in oklch, var(--ink, #101828) 22%, transparent));border-radius:var(--field-radius, var(--radius, 12px));transition:border-color .16s ease, box-shadow .16s ease}
.cf-referral-share-5 .rs5-field::placeholder{color:color-mix(in oklch, var(--field-ink, #101828) 65%, var(--field, #ffffff));opacity:1}
.cf-referral-share-5 .rs5-field:focus{outline:none;border-color:var(--field-focus, var(--accent, #2563eb));box-shadow:0 0 0 3px var(--rs5-focus)}
.cf-referral-share-5 .rs5-field[aria-invalid='true']{border-color:var(--danger, #c0362c)}
.cf-referral-share-5 .rs5-field[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger, #c0362c) l c h / 0.3)}
.cf-referral-share-5 .rs5-manual{min-height:96px}
.cf-referral-share-5 .rs5-error{margin:-4px 0 0;font-size:15px;line-height:1.4;font-weight:600;color:var(--danger, #c0362c);text-wrap:pretty}
.cf-referral-share-5 .rs5-error svg,.cf-referral-share-5 .rs5-notice-text svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-referral-share-5 .rs5-controls{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:4px}
.cf-referral-share-5 .rs5-chev{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:999px;background:oklch(from var(--band-ink, #ffffff) l c h / 0.12);color:var(--band-ink, #ffffff);cursor:pointer;transition:background .16s ease, transform .16s ease}
.cf-referral-share-5 .rs5-chev:hover:not(:disabled){background:oklch(from var(--band-ink, #ffffff) l c h / 0.22)}
.cf-referral-share-5 .rs5-chev:active:not(:disabled){transform:scale(0.95)}
.cf-referral-share-5 .rs5-dots{display:flex;align-items:center;gap:2px}
.cf-referral-share-5 .rs5-dot{display:inline-flex;align-items:center;justify-content:center;width:30px;height:44px;padding:0;border:0;border-radius:999px;background:none;cursor:pointer}
.cf-referral-share-5 .rs5-dot span{display:block;width:8px;height:8px;border-radius:999px;background:oklch(from var(--band-ink, #ffffff) l c h / 0.45);transition:width .2s var(--rs5-ease), background .2s ease}
.cf-referral-share-5 .rs5-dot:hover:not(:disabled) span{background:oklch(from var(--band-ink, #ffffff) l c h / 0.75)}
.cf-referral-share-5 .rs5-dot[aria-current='true'] span{width:22px;background:var(--band-ink, #ffffff)}
.cf-referral-share-5 .rs5-chev:disabled,.cf-referral-share-5 .rs5-dot:disabled{opacity:.5;cursor:not-allowed}
.cf-referral-share-5 .rs5-actions{display:grid;gap:12px;margin-top:16px}
.cf-referral-share-5 .rs5-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;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);line-height:1.15;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .16s ease, box-shadow .16s ease, transform .16s ease}
.cf-referral-share-5 .rs5-btn svg{flex:0 0 auto}
.cf-referral-share-5 .rs5-primary{min-height:64px;padding:0 28px;border:0;font-size:clamp(1.125rem, 1.55vw, 1.375rem);color:var(--button-ink, var(--cta-ink, #ffffff));text-shadow:var(--button-text-shadow, none);background:linear-gradient(oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l + 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2, #b42318)) calc(l - 0.02) c h));box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--rs5-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--rs5-shadow) l c h / 0.45))}
.cf-referral-share-5 .rs5-primary:not(.is-off):hover,.cf-referral-share-5 .rs5-primary.is-hover{background:linear-gradient(oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l - 0.01) c h), oklch(from var(--button-bg-2, var(--cta-2, #b42318)) calc(l - 0.07) c h));box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l + 0.1) c h / 0.6), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--rs5-shadow) l c h / 0.34), 0 10px 18px -6px oklch(from var(--rs5-shadow) l c h / 0.55))}
.cf-referral-share-5 .rs5-primary:not(.is-off):active,.cf-referral-share-5 .rs5-primary.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l - 0.05) c h), oklch(from var(--button-bg-2, var(--cta-2, #b42318)) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg-2, var(--cta-2, #b42318)) calc(l - 0.2) c h / 0.55), inset 0 -2px 0 oklch(from var(--button-bg, var(--cta, #d92d20)) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--rs5-shadow) l c h / 0.3)}
.cf-referral-share-5 .rs5-secondary{min-height:56px;padding:0 20px;font-size:1.0625rem;color:var(--button-2-ink, var(--secondary-ink, #101828));background-color:var(--card, #ffffff);background-image:linear-gradient(var(--button-2-bg, var(--secondary, #e9edf3)), var(--button-2-bg, var(--secondary, #e9edf3)));border:1px solid var(--button-2-border, transparent);box-shadow:var(--button-2-shadow, var(--shadow-sm, 0 1px 1px oklch(from var(--rs5-shadow) l c h / 0.18), 0 1px 3px oklch(from var(--rs5-shadow) l c h / 0.14)))}
.cf-referral-share-5 .rs5-secondary:not(.is-off):hover{background-image:linear-gradient(oklch(from var(--button-2-bg, var(--secondary, #e9edf3)) calc(l - 0.04) c h), oklch(from var(--button-2-bg, var(--secondary, #e9edf3)) calc(l - 0.04) c h))}
.cf-referral-share-5 .rs5-secondary:not(.is-off):active{transform:translateY(1px);background-image:linear-gradient(oklch(from var(--button-2-bg, var(--secondary, #e9edf3)) calc(l - 0.07) c h), oklch(from var(--button-2-bg, var(--secondary, #e9edf3)) calc(l - 0.07) c h))}
.cf-referral-share-5 .rs5-btn.is-copied,.cf-referral-share-5 .rs5-btn.is-copied:not(.is-off):hover{background:var(--success-soft, #e3f4e8);color:var(--success, #1a7f37);text-shadow:none;box-shadow:inset 0 0 0 1px var(--success, #1a7f37)}
.cf-referral-share-5 .rs5-btn:focus-visible,.cf-referral-share-5 .rs5-chev:focus-visible,.cf-referral-share-5 .rs5-dot:focus-visible{outline:3px solid var(--band-ink, #ffffff);outline-offset:3px}
.cf-referral-share-5 .rs5-btn.is-off,.cf-referral-share-5 .rs5-btn:disabled{opacity:.55;cursor:not-allowed;box-shadow:none;transform:none}
.cf-referral-share-5 .rs5-note{margin:4px 0 0;text-align:center;font-size:15px;line-height:1.4;font-weight:500;color:var(--band-ink, #ffffff);text-wrap:pretty}
.cf-referral-share-5 .rs5-notice{margin-top:16px;padding:16px;border-radius:10px;background:var(--danger-soft, #fbe9e7);color:var(--ink, #101828)}
.cf-referral-share-5 .rs5-notice-text{margin:0 0 12px;font-size:15px;line-height:1.4;font-weight:600;color:var(--danger, #c0362c);text-wrap:pretty}
.cf-referral-share-5 .rs5-story{grid-area:story;min-width:0;display:grid;gap:32px;animation:rs5-rise .45s var(--rs5-ease) .21s both}
.cf-referral-share-5 .rs5-points{list-style:none;margin:0;padding:0;display:grid;gap:24px}
.cf-referral-share-5 .rs5-point{display:grid;grid-template-columns:56px minmax(0, 1fr);gap:16px;align-items:start}
.cf-referral-share-5 .rs5-point.is-plain{grid-template-columns:minmax(0, 1fr)}
.cf-referral-share-5 .rs5-spot{display:block;width:56px;height:56px}
.cf-referral-share-5 .rs5-point p{margin:0;padding-top:4px;font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.5;color:var(--muted, #475467);text-wrap:pretty}
.cf-referral-share-5 .rs5-point strong{color:var(--ink, #101828);font-weight:800}
.cf-referral-share-5 .rs5-impact{list-style:none;margin:0;padding:24px 0 0;display:grid;grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));gap:24px;border-top:1px solid oklch(from var(--ink, #101828) l c h / 0.12)}
.cf-referral-share-5 .rs5-impact-value{display:block;margin-bottom:12px;font-family:var(--font-display);font-weight:var(--display-weight, 800);font-size:clamp(2.5rem, 4.2vw, 3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink, #101828)}
.cf-referral-share-5 .rs5-impact-label{display:block;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted, #475467);text-wrap:pretty}
.cf-referral-share-5 .rs5-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@media (min-width: 640px) and (hover: hover){
.cf-referral-share-5:not(.is-disabled) .rs5-card[data-pos='next']:hover{transform:translate(24px, 2px) rotate(5deg) scale(0.96)}
.cf-referral-share-5:not(.is-disabled) .rs5-card[data-pos='prev']:hover{transform:translate(-24px, 6px) rotate(-5deg) scale(0.93)}
}
@media (max-width: 639px){
.cf-referral-share-5 .rs5-fan{position:relative;padding:0 0 4px}
.cf-referral-share-5 .rs5-card:not([data-pos='front']){position:absolute;inset:0;overflow:hidden}
.cf-referral-share-5 .rs5-card[data-pos='next'],.cf-referral-share-5 .rs5-card[data-pos='prev'],.cf-referral-share-5 .rs5-card[data-pos='rest']{opacity:0;visibility:hidden;pointer-events:none;background:var(--card, #ffffff);transition:transform .32s var(--rs5-ease), opacity .24s ease, visibility 0s linear .32s}
.cf-referral-share-5 .rs5-card[data-pos='next']{transform:translateX(28px)}
.cf-referral-share-5 .rs5-card[data-pos='prev']{transform:translateX(-28px)}
.cf-referral-share-5 .rs5-card[data-pos='rest']{transform:scale(0.96)}
.cf-referral-share-5 .rs5-card[data-pos='front']{transition:transform .32s var(--rs5-ease), opacity .24s ease, visibility 0s linear 0s}
}
@media (min-width: 960px){
.cf-referral-share-5 .rs5-fx{display:block;position:absolute;z-index:0;top:clamp(24px, 4vw, 56px);right:0;width:min(44%, 620px);height:min(80%, 780px);isolation:isolate;overflow:hidden;pointer-events:none}
.cf-referral-share-5 .rs5-wrap{grid-template-columns:minmax(0, 1fr) minmax(380px, 440px);grid-template-rows:auto auto 1fr;grid-template-areas:'head share' 'photo share' 'story share';column-gap:clamp(32px, 5vw, 72px)}
.cf-referral-share-5 .rs5-panel{align-self:start}
.cf-referral-share-5 .rs5-photo img{height:auto;aspect-ratio:4 / 3}
}
@media (min-width: 960px) and (min-height: 840px){
.cf-referral-share-5 .rs5-panel{position:sticky;top:24px}
}
@keyframes rs5-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){
.cf-referral-share-5 .rs5-head,.cf-referral-share-5 .rs5-photo,.cf-referral-share-5 .rs5-panel,.cf-referral-share-5 .rs5-story{animation:none}
.cf-referral-share-5 .rs5-card[data-pos],.cf-referral-share-5 .rs5-btn,.cf-referral-share-5 .rs5-chev,.cf-referral-share-5 .rs5-dot span,.cf-referral-share-5 .rs5-editbtn,.cf-referral-share-5 .rs5-field{transition:none}
}
`
pieces/checkout/referral-share-5/specimen.tsx 37 lines
import __studioImagea086181a from "../assets/5d2acc358ff72dc2.webp";
// Specimen: a Clearwater Wells Project donation thank-you asking the donor to send one ready-written message to a friend.
import * as React from 'react'
import { ReferralShare5, type ReferralShare5Props } from '../referral-share-5'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error', 'success']
export default function ReferralShare5Specimen({ state = 'default' }: { state?: ReferralShare5Props['state'] }) {
return (
<ReferralShare5
state={state}
cause='the Clearwater Wells Project'
link='https://clearwaterwells.org/give'
sceneImage={slot(
'scene',
__studioImagea086181a,
)}
sceneImageAlt='Two women and a girl filling water containers at a hand-pump well in a village'
photoCaption='A village well site like the ones your gift helps build.'
messages={[
{
tone: 'Short and warm',
text: 'I just gave to the Clearwater Wells Project to help a village get a well close to home. I thought of you. Have a look:',
},
{
tone: 'Why I gave',
text: 'Nobody should have to walk for hours to find safe water. I gave to Clearwater Wells today. If that matters to you too, here’s where:',
},
{
tone: 'Straight ask',
text: 'Will you join me? I just gave to the Clearwater Wells Project, and I’m asking just one friend to look. That’s you:',
},
]}
/>
)
}
| Name | Type | Details |
|---|---|---|
preHeadline OptionalReferralShare5 |
React.ReactNode |
|
headline OptionalReferralShare5 |
React.ReactNode |
|
headingLevel OptionalReferralShare5 |
1 | 2 |
|
lead OptionalReferralShare5 |
React.ReactNode |
|
cause OptionalReferralShare5 |
string |
|
link OptionalReferralShare5 |
string |
|
messages OptionalReferralShare5 |
ReferralShare5Message[] |
|
sceneImage OptionalReferralShare5 |
string |
|
sceneImageAlt OptionalReferralShare5 |
string |
|
photoCaption OptionalReferralShare5 |
React.ReactNode |
|
points OptionalReferralShare5 |
ReferralShare5Point[] |
|
impact OptionalReferralShare5 |
ReferralShare5Impact[] |
|
channels OptionalReferralShare5 |
ReferralShare5Channel[] |
|
initialIndex OptionalReferralShare5 |
number |
|
copy OptionalReferralShare5 |
Partial<Omit<ReferralShare5Copy, 'channels'>> & {
channels?: Partial<Record<ReferralShare5Channel, string>>
} |
|
onAction OptionalReferralShare5 |
(channel: ReferralShare5Channel, payload: ReferralShare5Payload) => void |
|
onSelect OptionalReferralShare5 |
(index: number) => void |
|
onMessageChange OptionalReferralShare5 |
(index: number, message: string) => void |
|
disabled OptionalReferralShare5 |
boolean |
|
state OptionalReferralShare5 |
'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success' |
|
className OptionalReferralShare5 |
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.
--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.
-
09bc3d4486616844.webp
image/webp · 23.2 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
5d2acc358ff72dc2.webp
image/webp · 110 KB
-
7d6f1c81c93d8f71.webp
image/webp · 18.2 KB