Referral Share 13
Donation thank-you share ask: one huge line in the founder’s voice beside the well-site photo, then a fan of ready-written messages the donor taps or swipes through and sends to one friend by text, email or copy. Identity and mission, no reward.
Use it in a prompt
Use checkout/referral-share-13 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-13.tsx. - Import it and pass your copy and images (Props tab):
import { ReferralShare13 } from "@/components/funneldna/checkout/referral-share-13"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/referral-share-13/component.tsx 1162 lines
// layout: quote-led
// Donation thank-you share ask: one huge line in the founder’s voice beside the well-site photo, then a fan of ready-written messages the donor taps or swipes through and sends to one friend by text, email or copy. Identity and mission, no reward.
import * as React from 'react'
import { Check, CircleAlert, Link2, Mail, MapPin, MessageSquare, Pencil } from 'lucide-react'
export type ReferralShare13Channel = 'sms' | 'email' | 'copy'
export type ReferralShare13Message = {
/** Short name for the message’s tone, shown on its card, e.g. Short and sweet. */
tone: string
/** The ready-written message; the link is added after it when shared. */
text: string
}
export type ReferralShare13Impact = {
/** A supplied impact figure. Leave the list empty when none is supplied. */
value: string
/** What the figure means. */
label: string
}
export type ReferralShare13Copy = {
/** Subhead above the card fan. */
stepOne: string
/** Subhead above the share buttons. */
stepTwo: string
/** Line under the card fan. */
hint: string
editOpen: string
editClose: string
editLabel: string
editPlaceholder: string
editHint: string
/** Undo edits to the chosen card. */
editReset: string
/** Shown on a card whose message was cleared. */
emptyCard: string
emptyError: string
/** The plain instruction right above the buttons. */
instruction: string
channels: Record<ReferralShare13Channel, string>
copiedLabel: string
copiedAnnounce: string
copyError: string
/** Dot button label; {n} and {total} are replaced. */
dotLabel: string
emailSubject: string
/** The identity line under the buttons. */
identity: string
}
export type ReferralShare13Props = {
/** The one huge line; emphasise one phrase with em. */
headline?: React.ReactNode
/** Who said the line; with it the headline is set as a quote. */
attributionName?: string
attributionRole?: string
lead?: React.ReactNode
/** Ready-written share messages, fanned as cards. */
messages?: ReferralShare13Message[]
/** Page the friend should visit; added after the message. */
link?: string
/** Photo of the project (slot: scene). */
sceneImage?: string
sceneImageAlt?: string
/** Plain caption under the photo. */
photoCaption?: React.ReactNode
/** Supplied impact figures only; hidden when empty. */
impact?: ReferralShare13Impact[]
/** Share buttons in order; the first is the main button. */
channels?: ReferralShare13Channel[]
/** Card on top at first. */
defaultIndex?: number
copy?: Partial<Omit<ReferralShare13Copy, 'channels'>> & {
channels?: Partial<Record<ReferralShare13Channel, string>>
}
/** Called when a share button is used, with the full text (message plus link). Text and email then open the visitor’s own app. */
onAction?: (channel: ReferralShare13Channel, text: string) => void
/** Called when a different message card is chosen. */
onSelect?: (index: number, message: ReferralShare13Message) => void
disabled?: boolean
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
className?: string
}
export function ReferralShare13(props: ReferralShare13Props) {
const {
headline = DEFAULT_HEADLINE,
attributionName,
attributionRole,
lead = DEFAULT_LEAD,
messages,
link = '',
sceneImage,
sceneImageAlt = '',
photoCaption,
impact = [],
channels,
defaultIndex = 0,
onAction,
onSelect,
state = 'default',
className,
} = props
const custom = props.copy || {}
const copy: ReferralShare13Copy = {
...DEFAULT_COPY,
...custom,
channels: { ...DEFAULT_COPY.channels, ...(custom.channels || {}) },
}
const list = messages && messages.length > 0 ? messages : DEFAULT_MESSAGES
const n = list.length
const disabled = Boolean(props.disabled) || state === 'disabled'
const cleanLink = link.trim()
const shownChannels = channels && channels.length > 0 ? channels : DEFAULT_CHANNELS
const primary = shownChannels[0]
const rest = shownChannels.slice(1)
const quoted = Boolean(attributionName && attributionName.trim())
const uid = React.useId().replace(/:/g, '')
const headId = 'rs13' + uid + '-head'
const stepOneId = 'rs13' + uid + '-one'
const hintId = 'rs13' + uid + '-hint'
const editWrapId = 'rs13' + uid + '-editwrap'
const editId = 'rs13' + uid + '-edit'
const editHintId = 'rs13' + uid + '-edithint'
const errId = 'rs13' + uid + '-err'
const copyErrId = 'rs13' + uid + '-copyerr'
const messagesKey = list.map((m) => m.tone + '|' + m.text).join('||')
const start = clampIndex(defaultIndex, n)
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')
// true = finished fan (no JS, reduced motion); briefly false on mount so the cards deal out once.
const [spread, setSpread] = React.useState(true)
const cardRefs = React.useRef<Array<HTMLDivElement | null>>([])
const editorRef = React.useRef<HTMLTextAreaElement>(null)
const focusCard = React.useRef(false)
const focusEditor = React.useRef(false)
const selectEditor = React.useRef(false)
const swipe = React.useRef<{ x: number; y: number; id: number } | null>(null)
const swiped = React.useRef(false)
const timer = React.useRef<number | null>(null)
const alive = React.useRef(true)
React.useEffect(() => {
setDrafts(startDrafts(list, start, state))
setActive(start)
setEditing(state === 'error')
setTouched(state === 'error')
setCopyStatus('idle')
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [messagesKey, start, state])
useIsoLayoutEffect(() => {
if (typeof window === 'undefined' || !window.matchMedia) return
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return
setSpread(false)
let second = 0
const first = window.requestAnimationFrame(() => {
second = window.requestAnimationFrame(() => setSpread(true))
})
return () => {
window.cancelAnimationFrame(first)
window.cancelAnimationFrame(second)
}
}, [])
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
if (timer.current !== null) window.clearTimeout(timer.current)
}
}, [])
const cur = Math.min(active, n - 1)
React.useEffect(() => {
if (!focusCard.current) return
focusCard.current = false
const el = cardRefs.current[cur]
if (el) el.focus({ preventScroll: true })
}, [cur])
React.useEffect(() => {
const el = editorRef.current
if (!el) return
if (focusEditor.current || selectEditor.current) {
el.focus()
if (selectEditor.current) el.select()
focusEditor.current = false
selectEditor.current = false
}
})
const draft = drafts[cur] !== undefined ? drafts[cur] : list[cur].text
const trimmed = draft.trim()
const edited = draft !== list[cur].text
const showError = !disabled && trimmed === '' && (touched || state === 'error')
const editOpen = editing || showError
const shareText = cleanLink ? (trimmed ? trimmed + ' ' + cleanLink : cleanLink) : trimmed
const copied = !disabled && (state === 'success' || copyStatus === 'copied')
const copyFailed = !disabled && copyStatus === 'error'
const displayLink = cleanLink ? shortLink(cleanLink) : ''
function select(next: number) {
if (disabled || n < 2) return
const i = ((next % n) + n) % n
if (i === cur) return
setActive(i)
setCopyStatus('idle')
if (onSelect) onSelect(i, { tone: list[i].tone, text: drafts[i] !== undefined ? drafts[i] : list[i].text })
}
function onCardKey(event: React.KeyboardEvent<HTMLDivElement>) {
let next = -1
if (event.key === 'ArrowRight' || event.key === 'ArrowDown') next = cur + 1
else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') next = cur - 1
else if (event.key === 'Home') next = 0
else if (event.key === 'End') next = n - 1
else if (event.key === ' ' || event.key === 'Enter') {
// The focused card is always the chosen one; keep Space from scrolling the page.
event.preventDefault()
return
} else return
event.preventDefault()
focusCard.current = true
select(next)
}
function onCardClick(i: number) {
if (swiped.current) {
swiped.current = false
return
}
if (i !== cur) select(i)
}
function onPointerDown(event: React.PointerEvent<HTMLDivElement>) {
if (disabled || n < 2) return
if (event.pointerType === 'mouse' && event.button !== 0) return
swipe.current = { x: event.clientX, y: event.clientY, id: event.pointerId }
swiped.current = false
}
function onPointerUp(event: React.PointerEvent<HTMLDivElement>) {
const s = swipe.current
swipe.current = null
if (!s || s.id !== event.pointerId) return
const dx = event.clientX - s.x
const dy = event.clientY - s.y
if (Math.abs(dx) > 40 && Math.abs(dx) > Math.abs(dy) * 1.2) {
swiped.current = true
select(dx < 0 ? cur + 1 : cur - 1)
}
}
function toggleEdit() {
if (disabled) return
if (editOpen) {
if (trimmed === '') {
setDrafts((d) => {
const c = d.slice()
c[cur] = list[cur].text
return c
})
}
setTouched(false)
setEditing(false)
} else {
setEditing(true)
focusEditor.current = true
}
}
function resetEdit() {
setDrafts((d) => {
const c = d.slice()
c[cur] = list[cur].text
return c
})
setTouched(false)
setCopyStatus('idle')
focusEditor.current = true
}
function handleEdit(event: React.ChangeEvent<HTMLTextAreaElement>) {
const value = event.target.value
setDrafts((d) => {
const c = d.slice()
c[cur] = value
return c
})
if (copyStatus !== 'idle') setCopyStatus('idle')
}
function askForWords() {
setTouched(true)
setEditing(true)
focusEditor.current = true
}
async function handleCopy() {
if (disabled) return
if (trimmed === '') {
askForWords()
return
}
if (onAction) onAction('copy', shareText)
let ok = false
try {
if (typeof navigator !== 'undefined' && navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(shareText)
ok = true
}
} catch {
ok = false
}
if (!alive.current) return
if (!ok) ok = legacyCopy(shareText)
if (timer.current !== null) window.clearTimeout(timer.current)
if (ok) {
setCopyStatus('copied')
timer.current = window.setTimeout(() => setCopyStatus('idle'), 2200)
} else {
setCopyStatus('error')
setEditing(true)
selectEditor.current = true
}
}
function shareHref(ch: 'sms' | 'email') {
if (ch === 'sms') return 'sms:?&body=' + encodeURIComponent(shareText)
const body = cleanLink ? trimmed + NL + NL + cleanLink : trimmed
return 'mailto:?subject=' + encodeURIComponent(copy.emailSubject) + '&body=' + encodeURIComponent(body)
}
function handleShare(ch: 'sms' | 'email', event: React.MouseEvent<HTMLAnchorElement>) {
if (disabled) {
event.preventDefault()
return
}
if (trimmed === '') {
event.preventDefault()
askForWords()
return
}
if (onAction) onAction(ch, shareText)
}
function renderChannel(ch: ReferralShare13Channel, isPrimary: boolean) {
const cls = [
'rs13-btn',
isPrimary ? 'rs13-btn--primary' : 'rs13-btn--secondary',
isPrimary && state === 'hover' ? 'is-hover' : '',
isPrimary && state === 'active' ? 'is-active' : '',
ch === 'copy' && copied ? 'is-copied' : '',
]
.filter(Boolean)
.join(' ')
const describedBy = showError ? errId : ch === 'copy' && copyFailed ? copyErrId : undefined
if (ch === 'copy') {
return (
<button key={ch} type='button' className={cls} onClick={handleCopy} disabled={disabled} aria-describedby={describedBy}>
{copied ? <Check size={20} strokeWidth={2.5} aria-hidden='true' /> : <Link2 size={20} strokeWidth={2.5} aria-hidden='true' />}
<span>{copied ? copy.copiedLabel : copy.channels.copy}</span>
</button>
)
}
const Icon = ch === 'sms' ? MessageSquare : Mail
return (
<a
key={ch}
className={cls}
href={shareHref(ch)}
onClick={(event) => handleShare(ch, event)}
aria-disabled={disabled || undefined}
tabIndex={disabled ? -1 : undefined}
aria-describedby={describedBy}
>
<Icon size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{copy.channels[ch]}</span>
</a>
)
}
return (
<section className={'cf-referral-share-13' + (className ? ' ' + className : '')} aria-labelledby={headId}>
<style>{CSS}</style>
<div className={'rs13-wrap' + (sceneImage ? ' has-photo' : '')}>
{sceneImage ? (
<figure className='rs13-photo rs13-rise'>
<div className='rs13-frame'>
<img src={sceneImage} alt={sceneImageAlt} width={800} height={1000} decoding='async' />
</div>
{photoCaption || impact.length > 0 ? (
<figcaption className='rs13-caption'>
{photoCaption ? (
<p className='rs13-caption-text'>
<MapPin className='rs13-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{photoCaption}
</p>
) : null}
{impact.length > 0 ? (
<dl className='rs13-impact'>
{impact.map((f, i) => (
<div key={i}>
<dt>{f.label}</dt>
<dd>{f.value}</dd>
</div>
))}
</dl>
) : null}
</figcaption>
) : null}
</figure>
) : null}
<div className='rs13-main'>
<h2 id={headId} className={'rs13-head rs13-rise' + (quoted ? ' is-quoted' : '')} style={delay(1)}>
{quoted ? (
<span className='rs13-q rs13-q-open' aria-hidden='true'>
“
</span>
) : null}
{headline}
{quoted ? (
<span className='rs13-q' aria-hidden='true'>
”
</span>
) : null}
</h2>
{quoted ? (
<p className='rs13-attr rs13-rise' style={delay(1)}>
<span className='rs13-attr-name'>{attributionName}</span>
{attributionRole ? <span className='rs13-attr-role'>{attributionRole}</span> : null}
</p>
) : null}
{lead ? (
<p className='rs13-lead rs13-rise' style={delay(2)}>
{lead}
</p>
) : null}
<div className='rs13-step rs13-rise' style={delay(3)}>
<h3 id={stepOneId} className='rs13-subhead'>
<span className='rs13-num'>1</span>
<span>{copy.stepOne}</span>
</h3>
<div
className='rs13-stage'
onPointerDown={onPointerDown}
onPointerUp={onPointerUp}
onPointerCancel={() => {
swipe.current = null
}}
>
<div
className={'rs13-fan' + (spread ? '' : ' is-gathered')}
role='radiogroup'
aria-labelledby={stepOneId}
aria-describedby={n > 1 ? hintId : undefined}
aria-disabled={disabled || undefined}
>
{list.map((m, i) => {
const off = (i - cur + n) % n
const pos = off === 0 ? 'front' : off === 1 ? 'next' : off === n - 1 ? 'prev' : 'rest'
const text = drafts[i] !== undefined ? drafts[i] : m.text
const empty = text.trim() === ''
return (
<div
key={i}
ref={(el) => {
cardRefs.current[i] = el
}}
role='radio'
aria-checked={off === 0}
tabIndex={off === 0 ? 0 : -1}
aria-disabled={disabled || undefined}
className='rs13-card'
data-pos={pos}
onClick={() => onCardClick(i)}
onKeyDown={onCardKey}
>
<span className='rs13-card-top'>
<span className='rs13-tone'>{m.tone}</span>
<span className='rs13-badge' aria-hidden='true'>
<Check size={16} strokeWidth={3} />
</span>
</span>
<span className={'rs13-msg' + (empty ? ' is-empty' : '')}>{empty ? copy.emptyCard : text}</span>
{displayLink ? (
<span className='rs13-chip'>
<Link2 size={16} strokeWidth={2.5} aria-hidden='true' />
<span className='rs13-chip-text'>{displayLink}</span>
</span>
) : null}
</div>
)
})}
</div>
</div>
{n > 1 ? (
<div className='rs13-dots'>
{list.map((m, i) => (
<button
key={i}
type='button'
className='rs13-dot'
aria-label={fill(copy.dotLabel, { n: String(i + 1), total: String(n) })}
aria-current={i === cur ? 'true' : undefined}
onClick={() => select(i)}
disabled={disabled}
>
<span />
</button>
))}
</div>
) : null}
<div className='rs13-tools'>
{n > 1 ? (
<p id={hintId} className='rs13-hint'>
{copy.hint}
</p>
) : (
<span />
)}
<div className='rs13-tool-btns'>
{editOpen && edited && !disabled ? (
<button type='button' className='rs13-textbtn rs13-textbtn--quiet' onClick={resetEdit}>
{copy.editReset}
</button>
) : null}
<button
type='button'
className='rs13-textbtn'
aria-expanded={editOpen}
aria-controls={editWrapId}
onClick={toggleEdit}
disabled={disabled}
>
<Pencil size={18} strokeWidth={2.5} aria-hidden='true' />
{editOpen ? copy.editClose : copy.editOpen}
</button>
</div>
</div>
<div id={editWrapId} className='rs13-edit' hidden={!editOpen}>
<label htmlFor={editId} className='rs13-label'>
{copy.editLabel}
</label>
<textarea
ref={editorRef}
id={editId}
className='rs13-field'
rows={4}
value={draft}
placeholder={copy.editPlaceholder}
onChange={handleEdit}
onBlur={() => setTouched(true)}
aria-invalid={showError || undefined}
aria-describedby={showError ? errId : editHintId}
disabled={disabled}
/>
{showError ? (
<p id={errId} className='rs13-error' role='alert'>
<CircleAlert className='rs13-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.emptyError}
</p>
) : (
<p id={editHintId} className='rs13-field-hint'>
{copy.editHint}
</p>
)}
</div>
</div>
<div className='rs13-step rs13-rise' style={delay(4)}>
<h3 className='rs13-subhead'>
<span className='rs13-num'>2</span>
<span>{copy.stepTwo}</span>
</h3>
<p className='rs13-instruction'>{copy.instruction}</p>
<div className={'rs13-actions' + (rest.length === 1 ? ' is-pair' : '')}>
{renderChannel(primary, true)}
{rest.map((ch) => renderChannel(ch, false))}
</div>
{copyFailed ? (
<p id={copyErrId} className='rs13-error' role='alert'>
<CircleAlert className='rs13-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.copyError}
</p>
) : null}
{copy.identity ? <p className='rs13-identity'>{copy.identity}</p> : null}
</div>
<p className='rs13-sr' aria-live='polite'>
{copied ? copy.copiedAnnounce : ''}
</p>
</div>
</div>
</section>
)
}
export default ReferralShare13
const NL = String.fromCharCode(10)
const useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect
const DEFAULT_CHANNELS: ReferralShare13Channel[] = ['sms', 'email', 'copy']
const DEFAULT_HEADLINE = (
<>
You just helped. Will you tell <em>one friend?</em>
</>
)
const DEFAULT_LEAD = 'Good causes spread one friend at a time. We’ve written the message for you. You just choose who gets it.'
const DEFAULT_MESSAGES: ReferralShare13Message[] = [
{ tone: 'Short and sweet', text: 'I just gave to help a village get clean water. Will you join me?' },
{
tone: 'From the heart',
text: 'I did something small today that matters a lot: I helped fund a clean water well. I thought of you, because I know you care about this too.',
},
{
tone: 'Straight to it',
text: 'A clean well close to home means families stop walking for water. I just gave to help build one. You can give here:',
},
]
const DEFAULT_COPY: ReferralShare13Copy = {
stepOne: 'Pick the words that sound like you',
stepTwo: 'Send it to one friend',
hint: 'Tap a card or swipe to see another.',
editOpen: 'Edit the words',
editClose: 'Done editing',
editLabel: 'Your message',
editPlaceholder: 'I just gave to help a village get clean water. Will you join me?',
editHint: 'Your changes stay on this card.',
editReset: 'Undo my edits',
emptyCard: 'Your words go here.',
emptyError: 'Add a few words so your friend knows why you’re sending this.',
instruction: 'Pick a message above, then tap a button below to send it.',
channels: { sms: 'Text it to a friend', email: 'Email it', copy: 'Copy message' },
copiedLabel: 'Copied',
copiedAnnounce: 'Message copied. Paste it anywhere.',
copyError: 'We couldn’t copy it for you. Your message is selected above, so copy it by hand.',
dotLabel: 'Show message {n} of {total}',
emailSubject: 'Will you help with this?',
identity: 'No points, no prizes. Just you, passing on something good.',
}
function clampIndex(i: number, n: number) {
if (!Number.isFinite(i)) return 0
return Math.max(0, Math.min(n - 1, Math.floor(i)))
}
function startDrafts(list: ReferralShare13Message[], start: number, state: ReferralShare13Props['state']) {
const d = list.map((m) => m.text)
if (state === 'error') d[start] = ''
return d
}
function delay(step: number): React.CSSProperties {
return { animationDelay: Math.min(step * 0.07, 0.28) + 's' }
}
function fill(template: string, vars: Record<string, string>) {
let out = template
Object.keys(vars).forEach((key) => {
out = out.split('{' + key + '}').join(vars[key])
})
return out
}
function shortLink(url: string) {
let s = url
const i = s.indexOf('://')
if (i > -1) s = s.slice(i + 3)
if (s.indexOf('www.') === 0) s = s.slice(4)
if (s.charAt(s.length - 1) === '/') s = s.slice(0, -1)
return s
}
function legacyCopy(text: string): boolean {
if (typeof document === 'undefined' || !document.body) return false
const before = document.activeElement as HTMLElement | null
const area = document.createElement('textarea')
area.value = text
area.setAttribute('readonly', '')
area.style.position = 'fixed'
area.style.top = '0'
area.style.left = '-9999px'
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 (before && typeof before.focus === 'function') before.focus()
return ok
}
const CSS = `
.cf-referral-share-13 {
--rs13-ink: var(--ink, oklch(0.21 0.034 263));
--rs13-muted: var(--muted, oklch(0.446 0.03 258));
--rs13-surface: var(--surface, oklch(1 0 0));
--rs13-card: var(--card, oklch(1 0 0));
--rs13-accent: var(--accent, oklch(0.5 0.17 257));
--rs13-fill: var(--accent-fill, var(--rs13-accent));
--rs13-subhead: var(--subhead-ink, var(--rs13-accent));
--rs13-shadow: var(--shadow, oklch(0.22 0.03 256));
--rs13-btn: var(--button-bg, var(--cta, oklch(0.576 0.209 29.5)));
--rs13-btn-2: var(--button-bg-2, var(--cta-2, oklch(0.506 0.206 29.5)));
--rs13-ring: oklch(from var(--field-focus, var(--rs13-accent)) l c h / 0.55);
position: relative;
background: var(--rs13-surface);
color: var(--rs13-ink);
font-family: var(--font-body, system-ui, sans-serif);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
overflow-x: clip;
}
.cf-referral-share-13 *, .cf-referral-share-13 *::before, .cf-referral-share-13 *::after { box-sizing: border-box; }
.cf-referral-share-13 .rs13-wrap {
max-width: 1120px;
margin: 0 auto;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: clamp(32px, 5vw, 72px);
align-items: start;
}
.cf-referral-share-13 .rs13-photo { margin: 0; min-width: 0; }
.cf-referral-share-13 .rs13-frame {
border-radius: 12px;
overflow: hidden;
aspect-ratio: 3 / 2;
background: color-mix(in oklch, var(--rs13-ink) 6%, var(--rs13-surface));
}
.cf-referral-share-13 .rs13-frame img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: 50% 30%;
}
.cf-referral-share-13 .rs13-caption { margin-top: 12px; }
.cf-referral-share-13 .rs13-caption-text {
margin: 0;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--rs13-muted);
text-wrap: pretty;
}
.cf-referral-share-13 .rs13-inline-icon {
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: 0.4em;
}
.cf-referral-share-13 .rs13-caption-text .rs13-inline-icon { color: var(--rs13-accent); }
.cf-referral-share-13 .rs13-impact { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 16px 32px; }
.cf-referral-share-13 .rs13-impact div { display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
.cf-referral-share-13 .rs13-impact dt { font-size: 0.9375rem; line-height: 1.4; font-weight: 500; color: var(--rs13-muted); }
.cf-referral-share-13 .rs13-impact dd {
margin: 0;
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
font-variant-numeric: tabular-nums;
color: var(--rs13-ink);
}
.cf-referral-share-13 .rs13-main { min-width: 0; }
.cf-referral-share-13 .rs13-head {
margin: 0;
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
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.04;
color: var(--rs13-ink);
text-wrap: balance;
}
.cf-referral-share-13 .rs13-head em { font-style: normal; color: var(--rs13-accent); }
.cf-referral-share-13 .rs13-q { color: var(--rs13-accent); }
.cf-referral-share-13 .rs13-attr {
margin: 20px 0 0;
display: flex;
flex-wrap: wrap;
gap: 4px 12px;
font-size: 0.9375rem;
line-height: 1.4;
}
.cf-referral-share-13 .rs13-attr-name { font-weight: 800; color: var(--rs13-ink); }
.cf-referral-share-13 .rs13-attr-role { font-weight: 500; color: var(--rs13-muted); }
.cf-referral-share-13 .rs13-lead {
margin: 16px 0 0;
max-width: 60ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--rs13-muted);
text-wrap: pretty;
}
.cf-referral-share-13 .rs13-head + .rs13-lead { margin-top: 22px; }
.cf-referral-share-13 .rs13-step { margin-top: clamp(32px, 4vw, 48px); }
.cf-referral-share-13 .rs13-subhead {
display: flex;
align-items: baseline;
gap: 12px;
margin: 0 0 16px;
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
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;
color: var(--rs13-subhead);
text-wrap: balance;
}
.cf-referral-share-13 .rs13-num { flex: none; font-variant-numeric: tabular-nums; }
.cf-referral-share-13 .rs13-stage {
position: relative;
padding: clamp(20px, 3vw, 32px) clamp(24px, 9%, 64px) clamp(36px, 4vw, 48px);
border-radius: var(--card-radius, var(--radius, 14px));
background: color-mix(in oklch, var(--rs13-ink) 4%, var(--rs13-surface));
touch-action: pan-y;
}
.cf-referral-share-13 .rs13-fan { display: grid; }
.cf-referral-share-13 .rs13-card {
grid-area: 1 / 1;
display: flex;
flex-direction: column;
align-items: stretch;
gap: 12px;
width: 100%;
min-width: 0;
margin: 0;
text-align: left;
padding: clamp(20px, 3vw, 28px);
font: inherit;
color: var(--rs13-ink);
background: var(--rs13-card);
border: 1px solid var(--card-border, oklch(from var(--rs13-ink) 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(--rs13-shadow) l c h / 0.22), 0 4px 10px -2px oklch(from var(--rs13-shadow) l c h / 0.2)));
cursor: pointer;
user-select: none;
-webkit-tap-highlight-color: transparent;
transform-origin: 50% 100%;
transform: translate(var(--x, 0px), calc(var(--y, 0px) + var(--lift, 0px))) rotate(var(--r, 0deg)) scale(var(--s, 1));
transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.3s ease;
}
.cf-referral-share-13 .rs13-card[data-pos='front'] {
z-index: 3;
--x: 0px; --y: 0px; --r: 0deg; --s: 1;
border-color: oklch(from var(--rs13-accent) l c h / 0.55);
box-shadow: var(--shadow-lg, 0 2px 4px oklch(from var(--rs13-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--rs13-shadow) l c h / 0.32));
}
.cf-referral-share-13 .rs13-card[data-pos='next'] { z-index: 2; --x: 7%; --y: 12px; --r: 3.5deg; --s: 0.95; }
.cf-referral-share-13 .rs13-card[data-pos='prev'] { z-index: 1; --x: -7%; --y: 16px; --r: -3.5deg; --s: 0.91; }
.cf-referral-share-13 .rs13-card[data-pos='rest'] { z-index: 0; --x: 0px; --y: 20px; --r: 0deg; --s: 0.87; opacity: 0; visibility: hidden; }
.cf-referral-share-13 .rs13-fan.is-gathered .rs13-card { --x: 0px; --y: 0px; --r: 0deg; --s: 1; transition: none; }
.cf-referral-share-13 .rs13-card[data-pos='front']:active { --s: 0.985; }
.cf-referral-share-13 .rs13-card:focus-visible { outline: 3px solid var(--rs13-ring); outline-offset: 3px; }
.cf-referral-share-13 .rs13-fan[aria-disabled='true'] .rs13-card { cursor: default; }
@media (hover: hover) {
.cf-referral-share-13 .rs13-fan:not([aria-disabled='true']) .rs13-card:not([data-pos='front']):hover {
--lift: -8px;
border-color: oklch(from var(--rs13-accent) l c h / 0.4);
}
}
.cf-referral-share-13 .rs13-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.cf-referral-share-13 .rs13-tone { font-size: 1rem; line-height: 1.2; font-weight: 700; color: var(--rs13-ink); }
.cf-referral-share-13 .rs13-badge {
flex: none;
display: grid;
place-items: center;
width: 28px;
height: 28px;
border-radius: 999px;
background: var(--rs13-fill);
color: var(--accent-fill-ink, var(--rs13-card));
opacity: 0;
transform: scale(0.9);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.cf-referral-share-13 .rs13-card[data-pos='front'] .rs13-badge { opacity: 1; transform: scale(1); }
.cf-referral-share-13 .rs13-msg {
display: block;
flex: 1 1 auto;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--rs13-ink);
text-wrap: pretty;
overflow-wrap: anywhere;
}
.cf-referral-share-13 .rs13-card:not([data-pos='front']) .rs13-msg, .cf-referral-share-13 .rs13-card:not([data-pos='front']) .rs13-tone { color: var(--rs13-muted); }
.cf-referral-share-13 .rs13-msg.is-empty { color: var(--rs13-muted); font-style: italic; }
.cf-referral-share-13 .rs13-chip {
align-self: flex-start;
display: inline-flex;
align-items: center;
gap: 8px;
max-width: 100%;
min-height: 28px;
padding: 4px 12px;
border-radius: 999px;
background: color-mix(in oklch, var(--rs13-ink) 6%, var(--rs13-card));
color: var(--rs13-ink);
font-size: 0.875rem;
line-height: 1.2;
font-weight: 700;
}
.cf-referral-share-13 .rs13-chip svg { flex: none; }
.cf-referral-share-13 .rs13-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-referral-share-13 .rs13-dots { display: flex; justify-content: center; gap: 2px; margin-top: 8px; }
.cf-referral-share-13 .rs13-dot {
display: grid;
place-items: center;
width: 40px;
height: 40px;
padding: 0;
border: 0;
background: transparent;
cursor: pointer;
border-radius: 999px;
}
.cf-referral-share-13 .rs13-dot span {
display: block;
width: 8px;
height: 8px;
border-radius: 999px;
background: oklch(from var(--rs13-ink) l c h / 0.28);
transition: width 0.2s ease, background-color 0.2s ease;
}
.cf-referral-share-13 .rs13-dot[aria-current='true'] span { width: 24px; background: var(--rs13-fill); }
.cf-referral-share-13 .rs13-dot:hover:not(:disabled) span { background: oklch(from var(--rs13-ink) l c h / 0.45); }
.cf-referral-share-13 .rs13-dot[aria-current='true']:hover span { background: var(--rs13-fill); }
.cf-referral-share-13 .rs13-dot:focus-visible { outline: 3px solid var(--rs13-ring); outline-offset: -4px; }
.cf-referral-share-13 .rs13-dot:disabled { cursor: default; }
.cf-referral-share-13 .rs13-tools {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 4px 16px;
margin-top: 4px;
}
.cf-referral-share-13 .rs13-hint { margin: 0; font-size: 0.9375rem; line-height: 1.4; font-weight: 500; color: var(--rs13-muted); }
.cf-referral-share-13 .rs13-tool-btns { display: flex; flex-wrap: wrap; gap: 0 16px; }
.cf-referral-share-13 .rs13-textbtn {
display: inline-flex;
align-items: center;
gap: 8px;
min-height: 44px;
padding: 0 4px;
border: 0;
background: transparent;
font-family: inherit;
font-size: 1rem;
font-weight: 700;
color: var(--link, var(--rs13-accent));
text-decoration: underline;
text-decoration-color: oklch(from var(--link, var(--rs13-accent)) l c h / 0.45);
text-underline-offset: 0.18em;
cursor: pointer;
border-radius: 8px;
}
.cf-referral-share-13 .rs13-textbtn:hover:not(:disabled) {
color: oklch(from var(--link, var(--rs13-accent)) calc(l - 0.08) c h);
text-decoration-color: currentColor;
}
.cf-referral-share-13 .rs13-textbtn--quiet { color: var(--rs13-muted); text-decoration-color: oklch(from var(--rs13-muted) l c h / 0.5); font-weight: 600; }
.cf-referral-share-13 .rs13-textbtn--quiet:hover { color: var(--rs13-ink); }
.cf-referral-share-13 .rs13-textbtn:focus-visible { outline: 3px solid var(--rs13-ring); outline-offset: 2px; }
.cf-referral-share-13 .rs13-textbtn:disabled { color: var(--rs13-muted); cursor: not-allowed; }
.cf-referral-share-13 .rs13-edit { margin-top: 12px; }
.cf-referral-share-13 .rs13-edit[hidden] { display: none; }
.cf-referral-share-13 .rs13-label { display: block; margin-bottom: 8px; font-size: 1rem; line-height: 1.3; font-weight: 700; color: var(--label-ink, var(--rs13-ink)); }
.cf-referral-share-13 .rs13-field {
display: block;
width: 100%;
min-height: 120px;
padding: 14px 16px;
font-family: var(--font-body, system-ui, sans-serif);
font-size: 1.0625rem;
line-height: 1.5;
color: var(--field-ink, var(--rs13-ink));
background: var(--field, oklch(1 0 0));
border: 1px solid var(--field-border, color-mix(in oklch, var(--rs13-ink) 22%, transparent));
border-radius: var(--field-radius, var(--radius, 12px));
resize: vertical;
transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cf-referral-share-13 .rs13-field::placeholder { color: color-mix(in oklch, var(--field-ink, var(--rs13-ink)) 65%, var(--field, oklch(1 0 0))); opacity: 1; }
.cf-referral-share-13 .rs13-field:hover:not(:disabled) { border-color: color-mix(in oklch, var(--rs13-ink) 36%, transparent); }
.cf-referral-share-13 .rs13-field:focus { outline: none; border-color: var(--field-focus, var(--rs13-accent)); box-shadow: 0 0 0 3px oklch(from var(--field-focus, var(--rs13-accent)) l c h / 0.35); }
.cf-referral-share-13 .rs13-field[aria-invalid='true'] { border-color: var(--danger, oklch(0.5 0.17 27)); }
.cf-referral-share-13 .rs13-field[aria-invalid='true']:focus { box-shadow: 0 0 0 3px oklch(from var(--danger, oklch(0.5 0.17 27)) l c h / 0.3); }
.cf-referral-share-13 .rs13-field:disabled { cursor: not-allowed; background: color-mix(in oklch, var(--rs13-ink) 4%, var(--field, oklch(1 0 0))); }
.cf-referral-share-13 .rs13-field-hint { margin: 8px 0 0; font-size: 0.9375rem; line-height: 1.4; font-weight: 500; color: var(--rs13-muted); }
.cf-referral-share-13 .rs13-error {
margin: 8px 0 0;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--danger, oklch(0.5 0.17 27));
text-wrap: pretty;
}
.cf-referral-share-13 .rs13-actions + .rs13-error { margin-top: 12px; }
.cf-referral-share-13 .rs13-instruction {
margin: 0 0 16px;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
font-weight: 600;
color: var(--rs13-ink);
text-wrap: pretty;
}
.cf-referral-share-13 .rs13-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cf-referral-share-13 .rs13-btn--primary, .cf-referral-share-13 .rs13-actions.is-pair .rs13-btn--secondary { grid-column: 1 / -1; }
.cf-referral-share-13 .rs13-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
min-width: 0;
min-height: 56px;
padding: 0 24px;
border: 1px solid transparent;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display, var(--font-body, system-ui, sans-serif)));
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;
text-decoration: none;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.cf-referral-share-13 .rs13-btn svg { flex: none; }
.cf-referral-share-13 .rs13-btn:focus-visible { outline: 3px solid var(--rs13-ring); outline-offset: 3px; }
.cf-referral-share-13 .rs13-btn--primary {
min-height: 64px;
padding: 0 28px;
color: var(--button-ink, var(--cta-ink, oklch(1 0 0)));
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--rs13-btn) calc(l + 0.04) c h), oklch(from var(--rs13-btn-2) calc(l - 0.02) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--rs13-btn) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--rs13-btn) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--rs13-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--rs13-shadow) l c h / 0.42));
}
.cf-referral-share-13 .rs13-btn--primary:hover:not(:disabled):not([aria-disabled='true']), .cf-referral-share-13 .rs13-btn--primary.is-hover {
background: linear-gradient(oklch(from var(--rs13-btn) calc(l - 0.01) c h), oklch(from var(--rs13-btn-2) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--rs13-btn) calc(l + 0.12) c h / 0.6), inset 0 -3px 0 oklch(from var(--rs13-btn) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--rs13-shadow) l c h / 0.34), 0 10px 20px -6px oklch(from var(--rs13-shadow) l c h / 0.5);
}
.cf-referral-share-13 .rs13-btn--primary:active:not(:disabled):not([aria-disabled='true']), .cf-referral-share-13 .rs13-btn--primary.is-active {
transform: translateY(1px);
background: linear-gradient(oklch(from var(--rs13-btn) calc(l - 0.04) c h), oklch(from var(--rs13-btn-2) calc(l - 0.09) c h));
box-shadow: inset 0 2px 4px oklch(from var(--rs13-btn) calc(l - 0.22) c h / 0.5), inset 0 -2px 0 oklch(from var(--rs13-btn) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--rs13-shadow) l c h / 0.3);
}
.cf-referral-share-13 .rs13-btn--secondary {
color: var(--button-2-ink, var(--secondary-ink, var(--rs13-ink)));
background: var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263)));
border-color: var(--button-2-border, transparent);
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 1px oklch(from var(--rs13-shadow) l c h / 0.18), 0 1px 3px oklch(from var(--rs13-shadow) l c h / 0.14)));
}
.cf-referral-share-13 .rs13-btn--secondary:hover:not(:disabled):not([aria-disabled='true']) {
background: oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))) calc(l - 0.04) c h);
}
.cf-referral-share-13 .rs13-btn--secondary:active:not(:disabled):not([aria-disabled='true']) {
transform: translateY(1px);
background: oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))) calc(l - 0.07) c h);
box-shadow: none;
}
.cf-referral-share-13 .rs13-btn--secondary.is-copied, .cf-referral-share-13 .rs13-btn--secondary.is-copied:hover {
color: var(--success, oklch(0.5 0.138 150));
background: var(--success-soft, oklch(0.93 0.02 150));
text-shadow: none;
}
.cf-referral-share-13 .rs13-btn:disabled, .cf-referral-share-13 .rs13-btn[aria-disabled='true'] {
color: var(--rs13-muted);
background: var(--secondary, oklch(0.93 0.015 263));
border-color: transparent;
box-shadow: none;
text-shadow: none;
transform: none;
cursor: not-allowed;
}
.cf-referral-share-13 .rs13-identity {
margin: 16px 0 0;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--rs13-muted);
text-wrap: pretty;
}
.cf-referral-share-13 .rs13-sr {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
}
.cf-referral-share-13 .rs13-rise { animation: rs13-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rs13-rise {
from { opacity: 0.82; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}
@media (min-width: 900px) {
.cf-referral-share-13 .rs13-wrap.has-photo { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
.cf-referral-share-13 .rs13-photo { position: sticky; top: 24px; }
.cf-referral-share-13 .rs13-frame { aspect-ratio: 3 / 4; }
.cf-referral-share-13 .rs13-frame img { object-position: 50% 45%; }
.cf-referral-share-13 .rs13-q-open { margin-inline-start: -0.42em; }
}
@media (max-width: 639px) {
.cf-referral-share-13 .rs13-stage { overflow: hidden; padding: 16px 16px 20px; }
.cf-referral-share-13 .rs13-card:not([data-pos='front']) {
--y: 0px; --r: 0deg; --s: 1;
opacity: 0;
visibility: hidden;
transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease, visibility 0s linear 0.4s;
}
.cf-referral-share-13 .rs13-card[data-pos='next'] { --x: 22%; }
.cf-referral-share-13 .rs13-card[data-pos='prev'] { --x: -22%; }
.cf-referral-share-13 .rs13-card[data-pos='front'] {
transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease, visibility 0s, box-shadow 0.16s ease;
}
.cf-referral-share-13 .rs13-actions { grid-template-columns: minmax(0, 1fr); }
.cf-referral-share-13 .rs13-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
.cf-referral-share-13 .rs13-rise,
.cf-referral-share-13 .rs13-card,
.cf-referral-share-13 .rs13-card:not([data-pos='front']),
.cf-referral-share-13 .rs13-card[data-pos='front'],
.cf-referral-share-13 .rs13-badge,
.cf-referral-share-13 .rs13-dot span,
.cf-referral-share-13 .rs13-btn,
.cf-referral-share-13 .rs13-field { animation: none; transition: none; }
}
`
pieces/checkout/referral-share-13/specimen.tsx 40 lines
import __studioImage133c3111 from "../assets/cd62a26bfdc394a2.webp";
// Specimen: the Clearwater Wells Project thank-you share ask, with its well-site photo and three ready-written messages.
import * as React from 'react'
import { ReferralShare13 } from '../referral-share-13'
import type { ReferralShare13Props } from '../referral-share-13'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error', 'success']
export default function ReferralShare13Specimen({ state = 'default' }: { state?: ReferralShare13Props['state'] }) {
return (
<ReferralShare13
state={state}
attributionName='Amara Okafor'
attributionRole='Field director, Clearwater Wells Project'
sceneImage={slot(
'scene',
__studioImage133c3111,
)}
sceneImageAlt='A woman fills a yellow water can at a newly built hand-pump well in a village at sunset'
photoCaption='The new well site at Ndiwa, where the Clearwater Wells Project is digging now.'
link='https://clearwaterwells.org/give'
messages={[
{
tone: 'Short and sweet',
text: 'I just gave to the Clearwater Wells Project so a village can get clean water. Will you join me?',
},
{
tone: 'From the heart',
text: 'I did something small today that matters a lot: I helped fund a clean water well. I thought of you, because I know you care about this too.',
},
{
tone: 'Straight to it',
text: 'A clean well close to home means families stop walking for water. I just gave to help the Clearwater Wells Project build one. You can give here:',
},
]}
copy={{ emailSubject: 'I just helped build a clean water well' }}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalReferralShare13 |
React.ReactNode |
|
attributionName OptionalReferralShare13 |
string |
|
attributionRole OptionalReferralShare13 |
string |
|
lead OptionalReferralShare13 |
React.ReactNode |
|
messages OptionalReferralShare13 |
ReferralShare13Message[] |
|
link OptionalReferralShare13 |
string |
|
sceneImage OptionalReferralShare13 |
string |
|
sceneImageAlt OptionalReferralShare13 |
string |
|
photoCaption OptionalReferralShare13 |
React.ReactNode |
|
impact OptionalReferralShare13 |
ReferralShare13Impact[] |
|
channels OptionalReferralShare13 |
ReferralShare13Channel[] |
|
defaultIndex OptionalReferralShare13 |
number |
|
copy OptionalReferralShare13 |
Partial<Omit<ReferralShare13Copy, 'channels'>> & {
channels?: Partial<Record<ReferralShare13Channel, string>>
} |
|
onAction OptionalReferralShare13 |
(channel: ReferralShare13Channel, text: string) => void |
|
onSelect OptionalReferralShare13 |
(index: number, message: ReferralShare13Message) => void |
|
disabled OptionalReferralShare13 |
boolean |
|
state OptionalReferralShare13 |
'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success' |
|
className OptionalReferralShare13 |
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.
-
cd62a26bfdc394a2.webp
image/webp · 177 KB