Referral Share 4
Waitlist refer-a-friend band: the member’s place in line set huge beside the supplied move-up rule, a staircase slider that works out the place friends could take them to (honest maths, nothing invented), then the personal link to copy and share.
Use it in a prompt
Use checkout/referral-share-4 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-4.tsx. - Import it and pass your copy and images (Props tab):
import { ReferralShare4 } from "@/components/funneldna/checkout/referral-share-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/referral-share-4/component.tsx 761 lines
// layout: price-staircase
// Waitlist refer-a-friend band: the member’s place in line set huge beside the supplied move-up rule, a staircase slider that works out the place friends could take them to (honest maths, nothing invented), then the personal link to copy and share.
import * as React from 'react'
import { Check, CircleAlert, Copy, Link2, Mail, MessageSquare } from 'lucide-react'
import { FX_HOST, Pattern } from '../fx/fx'
export type ReferralShare4Channel = 'email' | 'sms' | 'x' | 'facebook'
export type ReferralShare4Payload = {
/** The member’s personal link. */
link: string
/** The share message with the link added after it. */
text: string
/** The mailto:, sms: or share address for channel shares. */
href?: string
}
export type ReferralShare4Copy = {
/** Confirmation line above the headline. */
preHeadline: string
headline: string
/** One-sentence lines under the headline. */
punch: string[]
/** The single-word closing line; empty hides it. */
punchWord: string
/** Line above the big numeral. */
placeLabel: string
/** Rule line; {count} is the places per friend. */
ruleOne: string
ruleMany: string
/** Shown instead of the rule when none is supplied. */
noRule: string
/** Shown when the member is already first. */
atFront: string
stairsHeading: string
sliderLabel: string
friendsZero: string
/** {count} is replaced. */
friendsOne: string
friendsMany: string
/** Slider aria-valuetext; {count} and {place} are replaced. */
valueZero: string
valueOne: string
valueMany: string
readoutLabel: string
readoutZero: string
/** {count} is the number of places gained. */
gainOne: string
gainMany: string
readoutFront: string
/** Caption under the first step. */
startCaption: string
/** Caption under the top step; {count} is the most friends. */
endCaption: string
/** Quiet line under the estimate; empty hides it. */
estimateNote: string
/** Line above the most places friends could gain; {count} is the most friends. */
reachLabel: string
/** The most places friends could gain; {count} is replaced. */
reachValue: string
shareHeading: string
/** The plain instruction right above the link and its button. */
instruction: string
linkLabel: string
/** Shown in the well when no link is supplied. */
noLink: string
copyLabel: string
copiedLabel: string
copiedAnnounce: string
copyError: string
shareLead: string
emailSubject: string
/** Quiet line under the share buttons; empty hides it. */
note: string
channels: Record<ReferralShare4Channel, string>
}
export type ReferralShare4Props = {
/** The member’s supplied place in line, e.g. 1284. */
place: number
/** Supplied rule: places each friend who joins moves the member up. The slider hides without it. */
placesPerFriend?: number
/** The member’s personal referral link; copy and share stay off without it. */
link?: string
/** Mark set before the numeral. */
placePrefix?: string
/** Product cut-out on a transparent background (slot: product). */
productImage?: string
productImageAlt?: string
/** Share message; the link is added after it. */
message?: string
/** Most friends on the slider (1 to 12). */
maxFriends?: number
/** Friends shown on the slider at first. */
defaultFriends?: number
channels?: ReferralShare4Channel[]
/** Number format locale. */
locale?: string
copy?: Partial<Omit<ReferralShare4Copy, 'channels'>> & {
channels?: Partial<Record<ReferralShare4Channel, string>>
}
/** Called after the link is copied or a share button is used. */
onAction?: (channel: ReferralShare4Channel | 'copy', payload: ReferralShare4Payload) => void
/** Called when the slider moves, with the place it works out. */
onFriendsChange?: (friends: number, place: number) => void
disabled?: boolean
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
className?: string
}
const DEFAULT_CHANNELS: ReferralShare4Channel[] = ['email', 'sms', 'x', 'facebook']
const DEFAULT_MESSAGE = 'I just joined the waitlist. Join with my link:'
const DEFAULT_COPY: ReferralShare4Copy = {
preHeadline: 'You’re on the list.',
headline: 'Want in sooner? Bring your friends.',
punch: ['Share your link.', 'A friend joins the waitlist.', 'You move up the line.'],
punchWord: 'Simple.',
placeLabel: 'You’re in line at',
ruleOne: 'Each friend who joins moves you up {count} place.',
ruleMany: 'Each friend who joins moves you up {count} places.',
noRule: 'Share your link below so your friends can join you.',
atFront: 'You’re at the front of the line.',
stairsHeading: 'See how far your friends can move you',
sliderLabel: 'If friends join',
friendsZero: 'No friends yet',
friendsOne: '{count} friend',
friendsMany: '{count} friends',
valueZero: 'No friends yet: you’re number {place} in line',
valueOne: '{count} friend joins: you’d be number {place} in line',
valueMany: '{count} friends join: you’d be number {place} in line',
readoutLabel: 'You’d be',
readoutZero: 'Slide to see where friends could take you.',
gainOne: '{count} place closer than today.',
gainMany: '{count} places closer than today.',
readoutFront: 'That’s the front of the line.',
startCaption: 'Today',
endCaption: 'With {count} friends',
estimateNote: 'Worked out from the rule above, one friend at a time.',
reachLabel: 'Bring {count} friends and you jump',
reachValue: '{count} places',
shareHeading: 'Send your link to one friend today',
instruction: 'Copy your link below and send it to a friend who’d want in.',
linkLabel: 'Your personal link',
noLink: 'Your link appears here as soon as it’s ready.',
copyLabel: 'Copy my link',
copiedLabel: 'Copied',
copiedAnnounce: 'Your link is copied.',
copyError: 'We couldn’t copy it automatically. Select the link above and copy it.',
shareLead: 'Or send it straight to a friend',
emailSubject: 'Come join me on the waitlist',
note: '',
channels: { email: 'Email', sms: 'Text', x: 'Post on X', facebook: 'Facebook' },
}
export function ReferralShare4(props: ReferralShare4Props) {
const {
place: rawPlace,
placesPerFriend,
link = '',
placePrefix = '#',
productImage,
productImageAlt = '',
message = DEFAULT_MESSAGE,
maxFriends = 10,
defaultFriends = 3,
channels,
locale = 'en-US',
onAction,
onFriendsChange,
state = 'default',
className,
} = props
const custom = props.copy || {}
const copy: ReferralShare4Copy = {
...DEFAULT_COPY,
...custom,
channels: { ...DEFAULT_COPY.channels, ...(custom.channels || {}) },
}
const disabled = Boolean(props.disabled) || state === 'disabled'
const place = Math.max(1, Math.round(Number(rawPlace) || 1))
const rule =
typeof placesPerFriend === 'number' && isFinite(placesPerFriend) && placesPerFriend > 0
? Math.round(placesPerFriend)
: 0
const max = clamp(Math.round(maxFriends), 1, 12)
const showSlider = rule > 0 && place > 1
const cleanLink = link.trim()
const linkReady = cleanLink !== '' && !disabled
const shownChannels = channels && channels.length > 0 ? channels : DEFAULT_CHANNELS
const cleanMessage = message.trim()
const shareText = cleanMessage ? cleanMessage + ' ' + cleanLink : cleanLink
const uid = React.useId().replace(/:/g, '')
const headId = 'rs4' + uid + '-head'
const rangeId = 'rs4' + uid + '-range'
const linkLabelId = 'rs4' + uid + '-linklabel'
const errorId = 'rs4' + uid + '-error'
const [friends, setFriends] = React.useState(() => clamp(Math.round(defaultFriends), 0, max))
const [status, setStatus] = React.useState<'idle' | 'copied' | 'error'>('idle')
const timer = React.useRef<number | null>(null)
const linkRef = React.useRef<HTMLSpanElement>(null)
React.useEffect(() => {
setFriends(clamp(Math.round(defaultFriends), 0, max))
}, [defaultFriends, max])
React.useEffect(() => {
setStatus('idle')
}, [state, cleanLink])
React.useEffect(() => {
return () => {
if (timer.current !== null) window.clearTimeout(timer.current)
}
}, [])
const fmt = (n: number) => {
try {
return n.toLocaleString(locale)
} catch {
return String(n)
}
}
const at = (f: number) => Math.max(1, place - f * rule)
const reach = at(friends)
const gained = place - reach
const maxGain = place - at(max)
const placeText = fmt(place)
const numLen = placeText.length + 0.6
const friendsText =
friends === 0
? copy.friendsZero
: fill(friends === 1 ? copy.friendsOne : copy.friendsMany, { count: String(friends) })
const valueText =
friends === 0
? fill(copy.valueZero, { place: placeText })
: fill(friends === 1 ? copy.valueOne : copy.valueMany, { count: String(friends), place: fmt(reach) })
const readoutLine =
friends === 0 || gained === 0
? copy.readoutZero
: reach === 1
? copy.readoutFront
: fill(gained === 1 ? copy.gainOne : copy.gainMany, { count: fmt(gained) })
const ruleNode =
place === 1
? copy.atFront
: rule > 0
? withBold(rule === 1 ? copy.ruleOne : copy.ruleMany, 'count', fmt(rule))
: copy.noRule
const steps = Array.from({ length: max + 1 }, (_, i) => {
const h = maxGain > 0 ? 14 + 86 * ((place - at(i)) / maxGain) : 14
return { i, h: Math.round(h * 10) / 10 }
})
const shown: 'idle' | 'copied' | 'error' = disabled
? 'idle'
: state === 'error'
? 'error'
: state === 'success'
? 'copied'
: status
const copyClass = [
'rs4-copy',
state === 'hover' ? 'is-hover' : '',
state === 'active' ? 'is-active' : '',
shown === 'copied' ? 'is-copied' : '',
]
.filter(Boolean)
.join(' ')
function change(value: number) {
if (disabled) return
const next = clamp(Math.round(value), 0, max)
setFriends(next)
if (onFriendsChange) onFriendsChange(next, at(next))
}
async function handleCopy() {
if (!linkReady) return
let ok = false
try {
if (typeof navigator !== 'undefined' && navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(cleanLink)
ok = true
}
} catch {
ok = false
}
if (!ok) ok = legacyCopy(cleanLink)
if (timer.current !== null) window.clearTimeout(timer.current)
if (ok) {
setStatus('copied')
if (onAction) onAction('copy', { link: cleanLink, text: shareText })
timer.current = window.setTimeout(() => setStatus('idle'), 2000)
} else {
setStatus('error')
selectNode(linkRef.current)
}
}
return (
<section
className={['cf-referral-share-4', className].filter(Boolean).join(' ')}
style={FX_HOST}
aria-labelledby={headId}
>
<Pattern name='grid' fade='edges' />
<style>{CSS}</style>
<div className='rs4-wrap'>
<header className='rs4-head'>
<p className='rs4-pre'>
<Check className='rs4-inline' size={20} strokeWidth={2.5} aria-hidden='true' />
{copy.preHeadline}
</p>
<h2 id={headId} className='rs4-h2'>
{copy.headline}
</h2>
<div className='rs4-punch'>
{copy.punch.map((line, i) => (
<p key={i}>{line}</p>
))}
{copy.punchWord ? <p className='rs4-word'>{copy.punchWord}</p> : null}
</div>
</header>
<div className={'rs4-board' + (showSlider ? '' : ' is-solo')}>
<div className='rs4-place'>
<p className='rs4-place-label'>{copy.placeLabel}</p>
<p className='rs4-num' style={cssVars({ '--rs4-len': numLen })}>
{placePrefix ? <span className='rs4-hash'>{placePrefix}</span> : null}
{placeText}
</p>
<p className='rs4-rule'>{ruleNode}</p>
{showSlider && maxGain > 0 ? (
<p className='rs4-reach'>
<span className='rs4-reach-label'>{fill(copy.reachLabel, { count: String(max) })}</span>
<span className='rs4-reach-num'>{fill(copy.reachValue, { count: fmt(maxGain) })}</span>
</p>
) : null}
</div>
{showSlider ? (
<div className='rs4-stairs'>
<h3 className='rs4-h3'>{copy.stairsHeading}</h3>
<div className='rs4-ctl'>
<label htmlFor={rangeId} className='rs4-label'>
{copy.sliderLabel}
</label>
<span className='rs4-count' aria-hidden='true'>
{friendsText}
</span>
</div>
<div className='rs4-track' style={cssVars({ '--rs4-n': max })}>
<div className={'rs4-steps' + (disabled ? ' is-disabled' : '')} aria-hidden='true'>
{steps.map((s) => (
<span
key={s.i}
className={
'rs4-step' + (s.i === friends ? ' is-on' : s.i < friends ? ' is-reached' : '')
}
style={cssVars({ '--i': s.i, '--h': s.h + '%' })}
onClick={() => change(s.i)}
/>
))}
</div>
<input
id={rangeId}
className='rs4-range'
type='range'
min={0}
max={max}
step={1}
value={friends}
disabled={disabled}
aria-valuetext={valueText}
onChange={(e) => change(Number(e.target.value))}
style={cssVars({ '--v': friends / max })}
/>
<div className='rs4-axis' aria-hidden='true'>
{steps.map((s) => (
<span key={s.i} className={s.i === friends ? 'is-on' : ''} style={cssVars({ '--i': s.i })}>
{s.i}
</span>
))}
</div>
</div>
<div className='rs4-ends'>
<span>
{copy.startCaption} <b>{placePrefix + placeText}</b>
</span>
<span>
{fill(copy.endCaption, { count: String(max) })} <b>{placePrefix + fmt(at(max))}</b>
</span>
</div>
<div className='rs4-readout'>
<span className='rs4-readout-label'>{copy.readoutLabel}</span>
<span key={friends} className='rs4-readout-num'>
{placePrefix + fmt(reach)}
</span>
<span className='rs4-readout-line'>{readoutLine}</span>
</div>
{copy.estimateNote ? <p className='rs4-estimate'>{copy.estimateNote}</p> : null}
</div>
) : null}
</div>
<div className={'rs4-share' + (productImage ? '' : ' no-img')}>
{productImage ? (
<div className='rs4-product'>
<img src={productImage} alt={productImageAlt} width={400} height={400} loading='lazy' decoding='async' />
</div>
) : null}
<div className='rs4-share-body'>
<h3 className='rs4-h3'>{copy.shareHeading}</h3>
<p className='rs4-instr'>{copy.instruction}</p>
<p className='rs4-label' id={linkLabelId}>
{copy.linkLabel}
</p>
<div className='rs4-linkrow'>
<div className={'rs4-well' + (shown === 'error' ? ' is-error' : '')} aria-labelledby={linkLabelId}>
<Link2 className='rs4-well-icon' size={18} strokeWidth={2.5} aria-hidden='true' />
{cleanLink ? (
<span ref={linkRef} className='rs4-link'>
{breakable(cleanLink)}
</span>
) : (
<span className='rs4-nolink'>{copy.noLink}</span>
)}
</div>
<button
type='button'
className={copyClass}
onClick={handleCopy}
disabled={!linkReady}
aria-describedby={shown === 'error' ? errorId : undefined}
>
{shown === 'copied' ? (
<Check size={20} strokeWidth={2.5} aria-hidden='true' />
) : (
<Copy size={20} strokeWidth={2.5} aria-hidden='true' />
)}
<span>{shown === 'copied' ? copy.copiedLabel : copy.copyLabel}</span>
</button>
</div>
{shown === 'error' ? (
<p id={errorId} className='rs4-error' role='alert'>
<CircleAlert className='rs4-inline' size={18} strokeWidth={2.5} aria-hidden='true' />
{copy.copyError}
</p>
) : null}
<p className='rs4-sr' aria-live='polite'>
{shown === 'copied' ? copy.copiedAnnounce : ''}
</p>
<p className='rs4-sharelead'>{copy.shareLead}</p>
<ul className='rs4-channels'>
{shownChannels.map((ch) => {
const href = linkReady ? shareHref(ch, cleanLink, cleanMessage, shareText, copy.emailSubject) : undefined
const external = ch === 'x' || ch === 'facebook'
return (
<li key={ch}>
<a
className='rs4-chan'
href={href}
target={external && href ? '_blank' : undefined}
rel={external ? 'noopener noreferrer' : undefined}
aria-disabled={href ? undefined : 'true'}
tabIndex={href ? undefined : -1}
onClick={(e) => {
if (!href) {
e.preventDefault()
return
}
if (onAction) onAction(ch, { link: cleanLink, text: shareText, href })
}}
>
<ChannelIcon channel={ch} />
<span>{copy.channels[ch]}</span>
</a>
</li>
)
})}
</ul>
{copy.note ? <p className='rs4-note'>{copy.note}</p> : null}
</div>
</div>
</div>
</section>
)
}
export default ReferralShare4
function ChannelIcon({ channel }: { channel: ReferralShare4Channel }) {
if (channel === 'email') return <Mail size={20} strokeWidth={2.5} aria-hidden='true' />
if (channel === 'sms') return <MessageSquare size={20} strokeWidth={2.5} aria-hidden='true' />
if (channel === 'x') return <XMark />
return <FacebookMark />
}
// Official X mark, drawn in the button’s text colour (the mark is monochrome).
function XMark() {
return (
<svg data-official-mark='X' className='rs4-mark' width='18' height='18' viewBox='0 0 24 24' aria-hidden='true' focusable='false'>
<path fill='currentColor' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z' />
</svg>
)
}
// Official Facebook mark in its official blue (documented official-mark exception).
function FacebookMark() {
return (
<svg data-official-mark='Facebook' className='rs4-mark' width='20' height='20' viewBox='0 0 24 24' aria-hidden='true' focusable='false'>
<path fill='#0866FF' d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z' />
</svg>
)
}
// Lets a long link wrap after a slash or before ?, & and = instead of mid-word.
function breakable(link: string): React.ReactNode {
const parts = link.split(/(?<=\/)|(?=[?&=])/)
return parts.map((part, i) => (
<React.Fragment key={i}>
{i > 0 ? <wbr /> : null}
{part}
</React.Fragment>
))
}
function clamp(n: number, lo: number, hi: number): number {
if (!isFinite(n)) return lo
return Math.min(hi, Math.max(lo, n))
}
function cssVars(values: Record<string, string | number>): React.CSSProperties {
return values as unknown as React.CSSProperties
}
function fill(template: string, values: Record<string, string>): string {
let out = template
Object.keys(values).forEach((key) => {
out = out.split('{' + key + '}').join(values[key])
})
return out
}
function withBold(template: string, key: string, value: string): React.ReactNode {
const parts = template.split('{' + key + '}')
if (parts.length === 1) return template
return parts.map((part, i) => (
<React.Fragment key={i}>
{part}
{i < parts.length - 1 ? <strong>{value}</strong> : null}
</React.Fragment>
))
}
function shareHref(
channel: ReferralShare4Channel,
link: string,
message: string,
text: string,
subject: string,
): string {
const enc = encodeURIComponent
if (channel === 'email') return 'mailto:?subject=' + enc(subject) + '&body=' + enc(text)
if (channel === 'sms') return 'sms:?&body=' + enc(text)
if (channel === 'x') return 'https://x.com/intent/post?text=' + enc(message) + '&url=' + enc(link)
return 'https://www.facebook.com/sharer/sharer.php?u=' + enc(link)
}
function legacyCopy(text: string): boolean {
if (typeof document === 'undefined' || !document.body) return false
const prev = 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 = '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 (prev && typeof prev.focus === 'function') prev.focus()
return ok
}
function selectNode(node: HTMLElement | null) {
if (!node || typeof window === 'undefined' || !window.getSelection) return
const range = document.createRange()
range.selectNodeContents(node)
const sel = window.getSelection()
if (!sel) return
sel.removeAllRanges()
sel.addRange(range)
}
const CSS = `
.cf-referral-share-4 {
--rs4-r: var(--card-radius, var(--radius, 14px));
--rs4-thumb: 28px;
--rs4-shadow: var(--shadow, oklch(0.22 0.03 260));
--rs4-af: var(--accent-fill, var(--accent, oklch(0.5 0.17 257)));
--rs4-well: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 4%, var(--card, oklch(1 0 0)));
box-sizing: border-box;
width: 100%;
overflow: hidden;
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
background: var(--band, oklch(0.27 0.067 256));
color: var(--band-ink, oklch(1 0 0));
font-family: var(--font-body, system-ui, sans-serif);
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
}
.cf-referral-share-4 *, .cf-referral-share-4 *::before, .cf-referral-share-4 *::after { box-sizing: border-box; }
.cf-referral-share-4 .rs4-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.cf-referral-share-4 .rs4-head { max-width: 46rem; margin: 0 0 clamp(32px, 4vw, 48px); }
.cf-referral-share-4 .rs4-pre { margin: 0 0 12px; font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.4; font-weight: 700; color: var(--band-ink, oklch(1 0 0)); text-wrap: pretty; }
.cf-referral-share-4 .rs4-inline { display: inline-block; vertical-align: -0.15em; margin-inline-end: 0.4em; }
.cf-referral-share-4 .rs4-h2 { margin: 0 0 16px; font-family: var(--font-display, 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(2rem, 3.6vw, 3.25rem); line-height: 1.06; text-wrap: balance; color: var(--band-ink, oklch(1 0 0)); }
.cf-referral-share-4 .rs4-punch p { margin: 0; font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.4; font-weight: 500; color: var(--band-ink, oklch(1 0 0)); text-wrap: pretty; }
.cf-referral-share-4 .rs4-punch .rs4-word { margin-top: 8px; font-family: var(--font-display, system-ui, sans-serif); font-weight: var(--display-weight, 800); }
.cf-referral-share-4 .rs4-board { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-radius: var(--rs4-r); box-shadow: var(--shadow-lg, 0 2px 4px oklch(from var(--rs4-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--rs4-shadow) l c h / 0.32)); }
.cf-referral-share-4 .rs4-board.is-solo { grid-template-columns: minmax(0, 1fr); }
.cf-referral-share-4 .rs4-place { container-type: inline-size; min-width: 0; display: flex; flex-direction: column; padding: clamp(24px, 3.5vw, 40px); background: var(--rs4-af); color: var(--accent-fill-ink, var(--card, oklch(1 0 0))); border-radius: var(--rs4-r) 0 0 var(--rs4-r); }
.cf-referral-share-4 .is-solo .rs4-place { border-radius: var(--rs4-r); }
.cf-referral-share-4 .rs4-place-label { margin: 0 0 16px; font-size: 0.875rem; line-height: 1.2; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.cf-referral-share-4 .rs4-num { display: flex; align-items: flex-start; margin: 0; font-family: var(--font-display, system-ui, sans-serif); font-weight: var(--display-weight, 800); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; font-size: clamp(3.5rem, 9vw, 7rem); font-size: clamp(2.75rem, calc(150cqi / var(--rs4-len, 6)), 10rem); }
.cf-referral-share-4 .rs4-hash { flex: none; margin: 0.14em 0.08em 0 0; font-size: 0.45em; line-height: 1; letter-spacing: 0; }
.cf-referral-share-4 .rs4-rule { margin: 0; padding-top: clamp(24px, 2.6vw, 32px); font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.35; font-weight: 600; text-wrap: pretty; }
.cf-referral-share-4 .rs4-rule strong { font-family: var(--font-display, system-ui, sans-serif); font-weight: var(--display-weight, 800); }
.cf-referral-share-4 .rs4-reach { display: flex; flex-direction: column; gap: 12px; margin: auto 0 0; padding-top: 32px; }
.cf-referral-share-4 .rs4-reach-label { font-size: 0.9375rem; line-height: 1.4; font-weight: 600; text-wrap: pretty; }
.cf-referral-share-4 .rs4-reach-num { font-family: var(--font-display, system-ui, sans-serif); 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; }
.cf-referral-share-4 .rs4-stairs { min-width: 0; padding: clamp(24px, 3.5vw, 40px); background: var(--card, oklch(1 0 0)); color: var(--ink, oklch(0.21 0.034 263)); border: 1px solid var(--card-border, oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.12)); border-left-width: 0; border-radius: 0 var(--rs4-r) var(--rs4-r) 0; }
.cf-referral-share-4 .rs4-h3 { margin: 0 0 16px; font-family: var(--font-display, 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; text-wrap: balance; color: var(--ink, oklch(0.21 0.034 263)); }
.cf-referral-share-4 .rs4-ctl { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.cf-referral-share-4 .rs4-label { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 700; color: var(--label-ink, var(--ink, oklch(0.21 0.034 263))); }
.cf-referral-share-4 .rs4-count { font-family: var(--font-display, system-ui, sans-serif); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent, oklch(0.5 0.17 257)); }
.cf-referral-share-4 .rs4-track { --rs4-pad: 28px; position: relative; padding-inline: var(--rs4-pad); }
.cf-referral-share-4 .rs4-steps { position: relative; height: 168px; }
.cf-referral-share-4 .rs4-step { position: absolute; bottom: 0; left: calc(var(--i) / var(--rs4-n) * 100%); width: min(calc(100% / var(--rs4-n) - 6px), 48px); height: var(--h); transform: translateX(-50%); border-radius: 8px 8px 3px 3px; background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 9%, var(--card, oklch(1 0 0))); cursor: pointer; transition: height 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.16s ease; }
.cf-referral-share-4 .rs4-step:hover { background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 16%, var(--card, oklch(1 0 0))); }
.cf-referral-share-4 .rs4-step.is-reached { background: oklch(from var(--rs4-af) l c h / 0.32); }
.cf-referral-share-4 .rs4-step.is-reached:hover { background: oklch(from var(--rs4-af) l c h / 0.44); }
.cf-referral-share-4 .rs4-step.is-on { background: linear-gradient(oklch(from var(--rs4-af) calc(l + 0.06) c h), var(--rs4-af)); box-shadow: inset 0 1px 0 oklch(from var(--rs4-af) calc(l + 0.16) c h / 0.7); }
.cf-referral-share-4 .rs4-steps.is-disabled .rs4-step { cursor: not-allowed; }
.cf-referral-share-4 .rs4-range { --rs4-fill: calc(var(--rs4-thumb) / 2 + (100% - var(--rs4-thumb)) * var(--v, 0)); display: block; width: calc(100% + var(--rs4-thumb)); height: 44px; margin: 12px calc(var(--rs4-thumb) / -2) 0; padding: 0; background: transparent; border-radius: 999px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.cf-referral-share-4 .rs4-range:focus { outline: none; }
.cf-referral-share-4 .rs4-range:focus-visible { outline: 3px solid var(--field-focus, var(--accent, oklch(0.5 0.17 257))); outline-offset: 2px; }
.cf-referral-share-4 .rs4-range::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(to right, var(--rs4-af) 0 var(--rs4-fill), color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 12%, var(--card, oklch(1 0 0))) var(--rs4-fill) 100%); }
.cf-referral-share-4 .rs4-range::-moz-range-track { height: 10px; border-radius: 999px; background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 12%, var(--card, oklch(1 0 0))); }
.cf-referral-share-4 .rs4-range::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--rs4-af); }
.cf-referral-share-4 .rs4-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; box-sizing: border-box; width: var(--rs4-thumb); height: var(--rs4-thumb); margin-top: -9px; border-radius: 50%; border: 4px solid var(--rs4-af); background: var(--card, oklch(1 0 0)); box-shadow: 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.3), 0 4px 8px -2px oklch(from var(--rs4-shadow) l c h / 0.3); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.cf-referral-share-4 .rs4-range::-moz-range-thumb { box-sizing: border-box; width: 28px; height: 28px; border-radius: 50%; border: 4px solid var(--rs4-af); background: var(--card, oklch(1 0 0)); box-shadow: 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.3), 0 4px 8px -2px oklch(from var(--rs4-shadow) l c h / 0.3); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.cf-referral-share-4 .rs4-range:hover::-webkit-slider-thumb { transform: scale(1.08); }
.cf-referral-share-4 .rs4-range:hover::-moz-range-thumb { transform: scale(1.08); }
.cf-referral-share-4 .rs4-range:active::-webkit-slider-thumb { transform: scale(0.96); }
.cf-referral-share-4 .rs4-range:active::-moz-range-thumb { transform: scale(0.96); }
.cf-referral-share-4 .rs4-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px oklch(from var(--field-focus, var(--accent, oklch(0.5 0.17 257))) l c h / 0.35), 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.3); }
.cf-referral-share-4 .rs4-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px oklch(from var(--field-focus, var(--accent, oklch(0.5 0.17 257))) l c h / 0.35), 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.3); }
.cf-referral-share-4 .rs4-range:disabled { cursor: not-allowed; }
.cf-referral-share-4 .rs4-range:disabled::-webkit-slider-thumb { border-color: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 30%, var(--card, oklch(1 0 0))); transform: none; }
.cf-referral-share-4 .rs4-range:disabled::-moz-range-thumb { border-color: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 30%, var(--card, oklch(1 0 0))); transform: none; }
.cf-referral-share-4 .rs4-axis { position: relative; height: 20px; margin-top: 4px; }
.cf-referral-share-4 .rs4-axis span { position: absolute; top: 0; left: calc(var(--i) / var(--rs4-n) * 100%); transform: translateX(-50%); font-size: 0.875rem; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted, oklch(0.45 0.03 258)); }
.cf-referral-share-4 .rs4-axis span.is-on { color: var(--ink, oklch(0.21 0.034 263)); }
.cf-referral-share-4 .rs4-ends { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 16px; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; color: var(--muted, oklch(0.45 0.03 258)); }
.cf-referral-share-4 .rs4-ends span:last-child { margin-left: auto; }
.cf-referral-share-4 .rs4-ends b { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink, oklch(0.21 0.034 263)); }
.cf-referral-share-4 .rs4-readout { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 12px 20px; margin-top: 24px; padding: 20px 24px; border-radius: 10px; background: var(--rs4-well); }
.cf-referral-share-4 .rs4-readout-label { grid-column: 1 / -1; font-size: 0.875rem; line-height: 1.2; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted, oklch(0.45 0.03 258)); }
.cf-referral-share-4 .rs4-readout-num { display: block; font-family: var(--font-display, system-ui, sans-serif); 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, oklch(0.21 0.034 263)); transform-origin: left bottom; animation: rs4-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-referral-share-4 .rs4-readout-line { padding-bottom: 4px; font-weight: 600; line-height: 1.4; color: var(--ink, oklch(0.21 0.034 263)); text-wrap: pretty; }
.cf-referral-share-4 .rs4-estimate { margin: 12px 0 0; font-size: 0.9375rem; line-height: 1.4; color: var(--muted, oklch(0.45 0.03 258)); text-wrap: pretty; }
.cf-referral-share-4 .rs4-share { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 48px); margin-top: 24px; padding: clamp(24px, 3.5vw, 40px); background: var(--card, oklch(1 0 0)); color: var(--ink, oklch(0.21 0.034 263)); border: 1px solid var(--card-border, oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.12)); border-radius: var(--rs4-r); box-shadow: var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.22), 0 4px 10px -2px oklch(from var(--rs4-shadow) l c h / 0.2))); }
.cf-referral-share-4 .rs4-share.no-img { grid-template-columns: minmax(0, 1fr); }
.cf-referral-share-4 .rs4-product img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; filter: drop-shadow(0 2px 3px oklch(from var(--rs4-shadow) l c h / 0.3)) drop-shadow(0 12px 14px oklch(from var(--rs4-shadow) l c h / 0.22)); }
.cf-referral-share-4 .rs4-share-body { min-width: 0; }
.cf-referral-share-4 .rs4-instr { max-width: 64ch; margin: 0 0 24px; color: var(--ink, oklch(0.21 0.034 263)); text-wrap: pretty; }
.cf-referral-share-4 .rs4-linkrow { display: flex; align-items: stretch; gap: 12px; margin-top: 8px; }
.cf-referral-share-4 .rs4-well { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border-radius: 10px; background: var(--rs4-well); border: 1px solid oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.08); color: var(--ink, oklch(0.21 0.034 263)); }
.cf-referral-share-4 .rs4-well.is-error { border-color: var(--danger, oklch(0.5 0.17 27)); }
.cf-referral-share-4 .rs4-well-icon { flex: none; color: var(--muted, oklch(0.45 0.03 258)); }
.cf-referral-share-4 .rs4-link { min-width: 0; font-size: 1.0625rem; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.cf-referral-share-4 .rs4-nolink { font-size: 0.9375rem; line-height: 1.4; color: var(--muted, oklch(0.45 0.03 258)); }
.cf-referral-share-4 .rs4-copy { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 28px; border: 0; border-radius: var(--button-radius, var(--radius, 12px)); background: linear-gradient(oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l + 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2, oklch(0.51 0.21 29))) calc(l - 0.02) c h)); color: var(--button-ink, var(--cta-ink, oklch(1 0 0))); font-family: var(--button-font, var(--font-display, system-ui, sans-serif)); font-weight: var(--button-weight, 800); text-transform: var(--button-case, none); font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.15; white-space: nowrap; text-shadow: var(--button-text-shadow, none); cursor: pointer; box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--rs4-shadow) l c h / 0.4)); transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
.cf-referral-share-4 .rs4-copy:hover:not(:disabled), .cf-referral-share-4 .rs4-copy.is-hover { background: linear-gradient(oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.01) c h), oklch(from var(--button-bg-2, var(--cta-2, oklch(0.51 0.21 29))) calc(l - 0.07) c h)); transform: translateY(-1px); box-shadow: inset 0 1px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.18) c h), 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.32), 0 12px 20px -8px oklch(from var(--rs4-shadow) l c h / 0.48); }
.cf-referral-share-4 .rs4-copy:active:not(:disabled), .cf-referral-share-4 .rs4-copy.is-active { transform: translateY(1px); box-shadow: inset 0 2px 4px oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.2) c h / 0.55), inset 0 -2px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--rs4-shadow) l c h / 0.3); }
.cf-referral-share-4 .rs4-copy:focus-visible { outline: 3px solid var(--field-focus, var(--accent, oklch(0.5 0.17 257))); outline-offset: 3px; }
.cf-referral-share-4 .rs4-copy:disabled { background: var(--secondary, oklch(0.93 0.015 263)); color: var(--secondary-ink, oklch(0.21 0.034 263)); text-shadow: none; box-shadow: none; transform: none; cursor: not-allowed; }
.cf-referral-share-4 .rs4-error { margin: 12px 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-4 .rs4-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-4 .rs4-sharelead { margin: 24px 0 12px; font-size: 0.9375rem; line-height: 1.4; font-weight: 700; color: var(--muted, oklch(0.45 0.03 258)); }
.cf-referral-share-4 .rs4-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cf-referral-share-4 .rs4-chan { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 6px 16px; border: 1px solid var(--button-2-border, transparent); border-radius: var(--button-radius, var(--radius, 12px)); background: var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))); color: var(--button-2-ink, var(--secondary-ink, oklch(0.21 0.034 263))); font-family: var(--button-font, var(--font-display, system-ui, sans-serif)); font-weight: var(--button-weight, 800); text-transform: var(--button-case, none); font-size: 1.0625rem; line-height: 1.15; text-align: center; text-wrap: balance; text-decoration: none; box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 1px oklch(from var(--rs4-shadow) l c h / 0.18), 0 1px 3px oklch(from var(--rs4-shadow) l c h / 0.14))); cursor: pointer; transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease; }
.cf-referral-share-4 .rs4-chan svg { flex: none; }
.cf-referral-share-4 .rs4-chan:not([aria-disabled='true']):hover { background: oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))) calc(l - 0.04) c h); transform: translateY(-1px); }
.cf-referral-share-4 .rs4-chan:not([aria-disabled='true']):active { background: oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))) calc(l - 0.07) c h); transform: translateY(1px); }
.cf-referral-share-4 .rs4-chan:focus-visible { outline: 3px solid var(--field-focus, var(--accent, oklch(0.5 0.17 257))); outline-offset: 2px; }
.cf-referral-share-4 .rs4-chan[aria-disabled='true'] { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.cf-referral-share-4 .rs4-note { margin: 16px 0 0; font-size: 0.9375rem; line-height: 1.4; color: var(--muted, oklch(0.45 0.03 258)); text-wrap: pretty; }
@keyframes rs4-rise { from { opacity: 0.82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rs4-pop { from { transform: scale(0.9); } to { transform: none; } }
.cf-referral-share-4 .rs4-head, .cf-referral-share-4 .rs4-board, .cf-referral-share-4 .rs4-share { animation: rs4-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-referral-share-4 .rs4-board { animation-delay: 0.07s; }
.cf-referral-share-4 .rs4-share { animation-delay: 0.14s; }
@media (max-width: 860px) {
.cf-referral-share-4 .rs4-board { grid-template-columns: minmax(0, 1fr); }
.cf-referral-share-4 .rs4-place { border-radius: var(--rs4-r) var(--rs4-r) 0 0; }
.cf-referral-share-4 .is-solo .rs4-place { border-radius: var(--rs4-r); }
.cf-referral-share-4 .rs4-stairs { border-left-width: 1px; border-top-width: 0; border-radius: 0 0 var(--rs4-r) var(--rs4-r); }
.cf-referral-share-4 .rs4-rule { padding-top: 24px; }
.cf-referral-share-4 .rs4-reach { display: none; }
}
@media (max-width: 720px) {
.cf-referral-share-4 .rs4-share { grid-template-columns: minmax(0, 1fr); }
.cf-referral-share-4 .rs4-product { display: none; }
}
@media (max-width: 560px) {
.cf-referral-share-4 .rs4-track { --rs4-pad: 16px; }
.cf-referral-share-4 .rs4-steps { height: 128px; }
.cf-referral-share-4 .rs4-step { border-radius: 6px 6px 2px 2px; }
.cf-referral-share-4 .rs4-readout { grid-template-columns: minmax(0, 1fr); padding: 16px 20px; }
.cf-referral-share-4 .rs4-linkrow { flex-direction: column; }
.cf-referral-share-4 .rs4-copy { width: 100%; }
.cf-referral-share-4 .rs4-chan { padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
.cf-referral-share-4 .rs4-head, .cf-referral-share-4 .rs4-board, .cf-referral-share-4 .rs4-share, .cf-referral-share-4 .rs4-readout-num { animation: none; }
.cf-referral-share-4 .rs4-step, .cf-referral-share-4 .rs4-copy, .cf-referral-share-4 .rs4-chan { transition: none; }
.cf-referral-share-4 .rs4-copy:hover:not(:disabled), .cf-referral-share-4 .rs4-copy.is-hover, .cf-referral-share-4 .rs4-chan:not([aria-disabled='true']):hover { transform: none; }
.cf-referral-share-4 .rs4-range::-webkit-slider-thumb { transition: none; }
.cf-referral-share-4 .rs4-range::-moz-range-thumb { transition: none; }
}
`
pieces/checkout/referral-share-4/specimen.tsx 31 lines
import __studioImaged7cd04ed from "../assets/d6fa6f7e9e7b5e29.webp";
import * as React from 'react'
import { ReferralShare4, type ReferralShare4Props } from '../referral-share-4'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error', 'success']
export default function ReferralShare4Specimen({ state = 'default' }: { state?: ReferralShare4Props['state'] } = {}) {
return (
<ReferralShare4
place={1284}
placesPerFriend={25}
link='https://tallywise.app/join?ref=dana-7k2q'
productImage={slot('product', __studioImaged7cd04ed)}
productImageAlt='The Tallywise budgeting app on a phone'
message='I just joined the Tallywise waitlist. Join with my link:'
copy={{
preHeadline: 'You’re on the Tallywise waitlist.',
headline: 'Want Tallywise sooner? Bring your friends.',
punch: ['Share your link.', 'A friend joins the waitlist.', 'You jump 25 places.'],
punchWord: 'Repeat.',
shareHeading: 'Send it to the friend who still budgets in a spreadsheet',
instruction: 'Copy your link below and text it to them tonight.',
emailSubject: 'Come join me on the Tallywise waitlist',
note: defaults.sample.registration.privacy,
}}
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
place RequiredReferralShare4 |
number |
|
placesPerFriend OptionalReferralShare4 |
number |
|
link OptionalReferralShare4 |
string |
|
placePrefix OptionalReferralShare4 |
string |
|
productImage OptionalReferralShare4 |
string |
|
productImageAlt OptionalReferralShare4 |
string |
|
message OptionalReferralShare4 |
string |
|
maxFriends OptionalReferralShare4 |
number |
|
defaultFriends OptionalReferralShare4 |
number |
|
channels OptionalReferralShare4 |
ReferralShare4Channel[] |
|
locale OptionalReferralShare4 |
string |
|
copy OptionalReferralShare4 |
Partial<Omit<ReferralShare4Copy, 'channels'>> & {
channels?: Partial<Record<ReferralShare4Channel, string>>
} |
|
onAction OptionalReferralShare4 |
(channel: ReferralShare4Channel | 'copy', payload: ReferralShare4Payload) => void |
|
onFriendsChange OptionalReferralShare4 |
(friends: number, place: number) => void |
|
disabled OptionalReferralShare4 |
boolean |
|
state OptionalReferralShare4 |
'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success' |
|
className OptionalReferralShare4 |
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-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d6fa6f7e9e7b5e29.webp
image/webp · 34.8 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB