Link In Bio 3
Link-in-bio shop shelf: every bio link is a rung on one rising shelf, from the free guide up to the bestseller,
Use it in a prompt
Use content/link-in-bio-3 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/content/link-in-bio-3.tsx. - Import it and pass your copy and images (Props tab):
import { LinkInBio3 } from "@/components/funneldna/content/link-in-bio-3"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/link-in-bio-3/component.tsx 845 lines
// layout: price-staircase
// Link-in-bio shop shelf: every bio link is a rung on one rising shelf, from the free guide up to the bestseller,
// so a visitor arriving from a social profile climbs the value ladder in one glance. Chips filter the shelf in place.
// Theme: every colour, face, radius and shadow reads the theme-contract tokens. The featured price sits on a solid
// --accent-fill tag with --accent-fill-ink text, so it stays readable on every theme.
import * as React from 'react'
import { AlertCircle, Check, Loader2, Lock } from 'lucide-react'
import { LayoutGroup, motion, useReducedMotion } from 'motion/react'
import { FX_HOST, Spot, Texture } from '../fx/fx'
import linen from '../fx/textures/linen'
import book from '../fx/spots/book'
import calendar from '../fx/spots/calendar'
import gift from '../fx/spots/gift'
import play from '../fx/spots/play'
export type LinkInBio3Kind = 'product' | 'guide' | 'newsletter'
export type LinkInBio3Tile = {
/** Stable key for the reflow animation. */
id: string
/** Category id this tile belongs to (one of the chips). */
category: string
/** Rung on the value ladder: 1 is free, the highest number is the top offer. Higher rungs sit higher on the shelf. */
step: number
kind?: LinkInBio3Kind
title: React.ReactNode
detail?: React.ReactNode
href?: string
/** Product cut-out on a transparent background (slots: product, item-n). */
image?: string
imageAlt?: string
/** fx Spot asset shown when the tile has no image. */
spot?: string
price?: string
/** Small chip above the title, e.g. Free guide. */
tag?: string
/** Featured tile only: flag on the photo, e.g. Bestseller. */
flag?: string
/** The dominant photo tile. The first featured tile wins. */
featured?: boolean
actionLabel?: string
/** Featured tile only: one reassurance line under the button. */
note?: React.ReactNode
/** Italic aside in the maker’s voice. */
aside?: React.ReactNode
/** Featured tile only: the commit line ticked above the button. Unticking it holds the button. */
commitLabel?: React.ReactNode
}
export type LinkInBio3Category = {
id: string
label: string
/** fx Spot asset for this category’s empty state. */
spot?: string
emptyTitle?: React.ReactNode
emptyDetail?: React.ReactNode
emptyActionLabel?: string
/** Category the empty-state button switches to (all by default). */
emptyTarget?: string
}
export type LinkInBio3Step = { step: number; label: React.ReactNode }
export type LinkInBio3Copy = {
allLabel: string
filterLabel: string
/** Template: {count} is replaced with the number of links. */
showingAll: string
/** Template: {count} and {label} are replaced. */
showingCategory: string
emptyTitle: string
emptyDetail: string
emptyActionLabel: string
/** Read before each price by screen readers. */
priceLabel: string
defaultAction: string
commitHint: string
emailLabel: string
emailPlaceholder: string
emailRequired: string
emailInvalid: string
/** Value shown in the field when the error state is previewed. */
errorSample: string
submitLabel: string
submittingLabel: string
privacy: string
}
export type LinkInBio3Props = {
name?: string
handle?: string
/** The one line. Wrap the key phrase in <mark> to set it in the accent colour. */
headline?: React.ReactNode
/** Slot: logo. Without it a monogram of the name is shown. */
logoImage?: string
logoAlt?: string
tiles?: LinkInBio3Tile[]
categories?: LinkInBio3Category[]
/** One short selling line per rung, shown on the step it labels. */
steps?: LinkInBio3Step[]
copy?: Partial<LinkInBio3Copy>
/** 1 when this block is the page’s first screen, 2 when it sits under another hero. */
headingLevel?: 1 | 2
/** all, or a category id. */
initialCategory?: string
/** Shows a spinner on the newsletter button while the builder handles the submit. */
loading?: boolean
onAction?: (tile: LinkInBio3Tile, index: number) => void
onSubmit?: (values: { email: string }) => void
onCategoryChange?: (category: string) => void
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error'
className?: string
}
const DEFAULT_COPY: LinkInBio3Copy = {
allLabel: 'All',
filterLabel: 'Filter the shelf',
showingAll: 'Showing all {count} links',
showingCategory: 'Showing {count} {label} links',
emptyTitle: 'Nothing here yet',
emptyDetail: 'Everything else on the shelf is one tap away.',
emptyActionLabel: 'Show everything',
priceLabel: 'Price:',
defaultAction: 'Shop now',
commitHint: 'Tick the box above to continue.',
emailLabel: 'Email address',
emailPlaceholder: 'you@example.com',
emailRequired: 'Enter your email so the notes have somewhere to go.',
emailInvalid: 'That email looks incomplete. Check it and try again.',
errorSample: 'you@example',
submitLabel: 'Get the notes',
submittingLabel: 'Sending',
privacy: 'We respect your inbox. Unsubscribe anytime.',
}
const DEFAULT_HEADLINE: React.ReactNode = (
<>
Burn it right. <mark>Love it longer.</mark>
</>
)
const DEFAULT_CATEGORIES: LinkInBio3Category[] = [
{ id: 'shop', label: 'Shop' },
{ id: 'learn', label: 'Learn', spot: book },
{
id: 'listen',
label: 'Listen',
spot: play,
emptyTitle: 'Nothing to listen to yet',
emptyDetail: 'Start with the free burn guide while you’re here.',
emptyActionLabel: 'See the free guide',
emptyTarget: 'learn',
},
]
const DEFAULT_STEPS: LinkInBio3Step[] = [
{ step: 1, label: 'Start here, free' },
{ step: 2, label: 'Hear about new scents first' },
{ step: 3, label: 'Try a small batch' },
{ step: 4, label: 'Bring home the bestseller' },
]
const DEFAULT_TILES: LinkInBio3Tile[] = [
{
id: 'hearth',
category: 'shop',
step: 4,
featured: true,
flag: 'Bestseller',
title: 'The Hearth Candle',
detail: 'Three wicks of cedar and smoked vanilla, poured by hand in small batches.',
price: '$47',
commitLabel: 'I understand I’m covered by the 30-day money-back guarantee.',
actionLabel: 'Bring the Hearth home',
note: 'Secure checkout · Hand-poured to order',
href: '#hearth',
},
{
id: 'travel-tins',
category: 'shop',
step: 3,
title: 'Travel Tin Trio',
detail: 'Three small tins to find your scent before you commit.',
price: '$29',
actionLabel: 'Shop the trio',
href: '#travel-tins',
},
{
id: 'gift-card',
category: 'shop',
step: 3,
title: 'Fernhouse Gift Card',
detail: 'Let them choose their own slow evening.',
price: '$19',
spot: gift,
actionLabel: 'Send a gift card',
href: '#gift-card',
},
{
id: 'sunday-notes',
category: 'learn',
step: 2,
kind: 'newsletter',
title: 'Get the Sunday notes',
detail: 'One short email with new scents first, plus one care tip.',
tag: 'Free · weekly',
spot: calendar,
actionLabel: 'Get the notes',
},
{
id: 'burn-guide',
category: 'learn',
step: 1,
kind: 'guide',
title: 'How to burn a candle right',
detail: 'The first-burn rule, wick trims and the four-hour limit.',
tag: 'Free guide',
aside: '(I tunnelled my first dozen candles. This is how I stopped.)',
spot: book,
actionLabel: 'Read the guide',
href: '#burn-guide',
},
]
const EMAIL_PATTERN = /^[^@ ]+@[^@ ]+[.][^@ ]+$/
const EASE: [number, number, number, number] = [0.2, 0.7, 0.2, 1]
const STACK_BELOW = 940
const useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect
export function LinkInBio3(props: LinkInBio3Props) {
const {
name = 'Fernhouse Candles',
handle = '@fernhousecandles',
headline = DEFAULT_HEADLINE,
logoImage,
logoAlt,
tiles = DEFAULT_TILES,
categories = DEFAULT_CATEGORIES,
steps = DEFAULT_STEPS,
headingLevel = 2,
initialCategory = 'all',
loading = false,
onAction,
onSubmit,
onCategoryChange,
state = 'default',
className,
} = props
const copy: LinkInBio3Copy = { ...DEFAULT_COPY, ...props.copy }
const disabled = state === 'disabled'
const reduce = useReducedMotion() ?? false
const frameRef = React.useRef<HTMLDivElement>(null)
const stacked = useStacked(frameRef)
const uid = React.useId()
const headId = `${uid}-head`
const hintId = `${uid}-hint`
const fieldId = `${uid}-email`
const errorId = `${uid}-email-error`
const chipRefs = React.useRef<Record<string, HTMLButtonElement | null>>({})
const inputRef = React.useRef<HTMLInputElement>(null)
const [category, setCategory] = React.useState(initialCategory)
const [live, setLive] = React.useState('')
const [committed, setCommitted] = React.useState(true)
const [email, setEmail] = React.useState(state === 'error' ? copy.errorSample : '')
const [emailError, setEmailError] = React.useState<string | null>(state === 'error' ? copy.emailInvalid : null)
React.useEffect(() => {
if (state === 'error') {
setEmail(copy.errorSample)
setEmailError(copy.emailInvalid)
} else {
setEmailError(null)
}
}, [state, copy.errorSample, copy.emailInvalid])
const featuredId = tiles.find((tile) => tile.featured)?.id
const visible = category === 'all' ? tiles : tiles.filter((tile) => tile.category === category)
const rungs = Array.from(new Set(visible.map((tile) => tile.step))).sort((a, b) => a - b)
const columns = rungs.map((step) => ({ step, tiles: visible.filter((tile) => tile.step === step) }))
const ordered = stacked ? [...columns].reverse() : columns
const firstLinkId = visible.find((tile) => tile.id !== featuredId && (tile.kind ?? 'product') !== 'newsletter')?.id
const chips: { id: string; label: string }[] = [{ id: 'all', label: copy.allLabel }, ...categories]
const hoverChipId = chips.find((chip) => chip.id !== category)?.id
const activeCategory = categories.find((cat) => cat.id === category)
const countFor = (id: string) => (id === 'all' ? tiles.length : tiles.filter((tile) => tile.category === id).length)
const choose = (id: string) => {
if (disabled) return
setCategory(id)
onCategoryChange?.(id)
const count = String(countFor(id))
const label = chips.find((chip) => chip.id === id)?.label ?? ''
setLive(
id === 'all'
? copy.showingAll.replace('{count}', count)
: copy.showingCategory.replace('{count}', count).replace('{label}', label),
)
}
const submit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault()
if (disabled || loading) return
const value = email.trim()
if (!value) {
setEmailError(copy.emailRequired)
inputRef.current?.focus()
return
}
if (!EMAIL_PATTERN.test(value)) {
setEmailError(copy.emailInvalid)
inputRef.current?.focus()
return
}
setEmailError(null)
onSubmit?.({ email: value })
}
const renderFeatured = (tile: LinkInBio3Tile, index: number) => {
const canBuy = !disabled && (!tile.commitLabel || committed)
const held = !disabled && !canBuy
const buyClass = cx('cf-lib3__buy', state === 'hover' && 'is-hover', state === 'active' && 'is-active')
const label = tile.actionLabel ?? copy.defaultAction
const titleId = `${uid}-${tile.id}`
return (
<article className='cf-lib3__tile is-featured' aria-labelledby={titleId}>
<div className='cf-lib3__stage'>
{tile.flag ? <span className='cf-lib3__flag'>{tile.flag}</span> : null}
{tile.image ? (
<img className='cf-lib3__stage-img' src={tile.image} alt={tile.imageAlt ?? ''} width={600} height={600} />
) : (
<span className='cf-lib3__stage-spot'>
<Spot src={tile.spot ?? gift} size={168} />
</span>
)}
{tile.price ? (
<span className='cf-lib3__tagprice'>
<span className='cf-lib3__sr'>{copy.priceLabel} </span>
{tile.price}
</span>
) : null}
</div>
<div className='cf-lib3__body'>
<h3 className='cf-lib3__title' id={titleId}>
{tile.title}
</h3>
{tile.detail ? <p className='cf-lib3__detail'>{tile.detail}</p> : null}
{tile.aside ? <p className='cf-lib3__aside'>{tile.aside}</p> : null}
</div>
{tile.commitLabel ? (
<label className='cf-lib3__commit'>
<input
type='checkbox'
checked={committed}
disabled={disabled}
onChange={(event) => setCommitted(event.target.checked)}
/>
<span className='cf-lib3__box' aria-hidden='true'>
<Check size={16} strokeWidth={3} />
</span>
<span>{tile.commitLabel}</span>
</label>
) : null}
{canBuy && tile.href ? (
<a className={buyClass} href={tile.href} onClick={() => onAction?.(tile, index)}>
{label}
</a>
) : (
<button
type='button'
className={buyClass}
disabled={!canBuy}
aria-describedby={held ? hintId : undefined}
onClick={() => onAction?.(tile, index)}
>
{label}
</button>
)}
{held ? (
<p className='cf-lib3__note' id={hintId}>
{copy.commitHint}
</p>
) : tile.note ? (
<p className='cf-lib3__note'>
<Lock size={16} strokeWidth={2.5} aria-hidden='true' />
{tile.note}
</p>
) : null}
</article>
)
}
const renderForm = (tile: LinkInBio3Tile) => {
const titleId = `${uid}-${tile.id}`
return (
<div className='cf-lib3__tile is-form'>
<span className='cf-lib3__top'>
<span className='cf-lib3__spot'>
<Spot src={tile.spot ?? calendar} size={56} />
</span>
{tile.tag ? <span className='cf-lib3__tag'>{tile.tag}</span> : null}
</span>
<div className='cf-lib3__body'>
<h3 className='cf-lib3__title' id={titleId}>
{tile.title}
</h3>
{tile.detail ? <p className='cf-lib3__detail'>{tile.detail}</p> : null}
</div>
<form className='cf-lib3__form' noValidate aria-labelledby={titleId} onSubmit={submit}>
<label className='cf-lib3__label' htmlFor={fieldId}>
{copy.emailLabel}
</label>
<input
ref={inputRef}
id={fieldId}
className='cf-lib3__input'
type='email'
name='email'
inputMode='email'
autoComplete='email'
placeholder={copy.emailPlaceholder}
value={email}
disabled={disabled}
aria-invalid={emailError ? true : undefined}
aria-describedby={emailError ? errorId : undefined}
onChange={(event) => {
setEmail(event.target.value)
if (emailError) setEmailError(null)
}}
/>
{emailError ? (
<p className='cf-lib3__error' id={errorId} role='alert'>
<AlertCircle size={16} strokeWidth={2.5} aria-hidden='true' />
{emailError}
</p>
) : null}
<button type='submit' className='cf-lib3__sec is-full' disabled={disabled || loading} aria-busy={loading || undefined}>
{loading ? (
<>
<Loader2 className='cf-lib3__spin' size={20} strokeWidth={2.5} aria-hidden='true' />
{copy.submittingLabel}
</>
) : (
tile.actionLabel ?? copy.submitLabel
)}
</button>
<p className='cf-lib3__privacy'>{copy.privacy}</p>
</form>
</div>
)
}
const renderLink = (tile: LinkInBio3Tile, index: number) => {
const kind = tile.kind ?? 'product'
const forced = tile.id === firstLinkId
const cls = cx(
'cf-lib3__tile',
'is-link',
`is-${kind}`,
forced && state === 'hover' && 'is-hover',
forced && state === 'active' && 'is-active',
)
const linked = !disabled && Boolean(tile.href)
const actionLabel = tile.actionLabel ?? copy.defaultAction
const action = linked ? (
<span className='cf-lib3__sec'>{actionLabel}</span>
) : (
<button type='button' className='cf-lib3__sec' disabled={disabled} onClick={() => onAction?.(tile, index)}>
{actionLabel}
</button>
)
const inner = (
<>
{kind === 'guide' ? (
<span className='cf-lib3__top'>
<span className='cf-lib3__spot'>
<Spot src={tile.spot ?? book} size={64} />
</span>
{tile.tag ? <span className='cf-lib3__tag'>{tile.tag}</span> : null}
</span>
) : (
<>
<span className='cf-lib3__media'>
{tile.image ? (
<img src={tile.image} alt={tile.imageAlt ?? ''} width={320} height={320} loading='lazy' />
) : (
<Spot src={tile.spot ?? gift} size={104} />
)}
</span>
{tile.tag ? <span className='cf-lib3__tag'>{tile.tag}</span> : null}
</>
)}
<div className='cf-lib3__body'>
<h3 className='cf-lib3__title'>{tile.title}</h3>
{tile.detail ? <span className='cf-lib3__detail'>{tile.detail}</span> : null}
{tile.aside ? <span className='cf-lib3__aside'>{tile.aside}</span> : null}
</div>
<div className='cf-lib3__foot'>
{tile.price ? (
<span className='cf-lib3__price'>
<span className='cf-lib3__sr'>{copy.priceLabel} </span>
{tile.price}
</span>
) : null}
{action}
</div>
</>
)
if (linked) {
return (
<a className={cls} href={tile.href} onClick={() => onAction?.(tile, index)}>
{inner}
</a>
)
}
return (
<div className={cls} aria-disabled={disabled ? 'true' : undefined}>
{inner}
</div>
)
}
const renderTile = (tile: LinkInBio3Tile) => {
const index = tiles.indexOf(tile)
if (tile.id === featuredId) return renderFeatured(tile, index)
if ((tile.kind ?? 'product') === 'newsletter') return renderForm(tile)
return renderLink(tile, index)
}
let order = 0
const H = headingLevel === 1 ? 'h1' : 'h2'
const emptyTarget = activeCategory?.emptyTarget ?? 'all'
return (
<section
className={cx('cf-lib3', stacked && 'is-stacked', disabled && 'is-disabled', className)}
style={FX_HOST}
aria-labelledby={headId}
>
<Texture src={linen} tone='ink' />
<style>{CSS}</style>
<div className='cf-lib3__frame' ref={frameRef}>
<div className='cf-lib3__inner'>
<header className='cf-lib3__head'>
<div className='cf-lib3__lockup'>
{logoImage ? (
<img className='cf-lib3__logo' src={logoImage} alt={logoAlt ?? name} width={56} height={56} />
) : (
<span className='cf-lib3__mono' aria-hidden='true'>
{initials(name)}
</span>
)}
<div>
<p className='cf-lib3__name'>{name}</p>
{handle ? <p className='cf-lib3__handle'>{handle}</p> : null}
</div>
</div>
<H className='cf-lib3__headline' id={headId}>
{headline}
</H>
</header>
<div className='cf-lib3__chips' role='group' aria-label={copy.filterLabel}>
{chips.map((chip) => {
const pressed = category === chip.id
return (
<button
key={chip.id}
ref={(el) => {
chipRefs.current[chip.id] = el
}}
type='button'
className={cx(
'cf-lib3__chip',
state === 'hover' && chip.id === hoverChipId && 'is-hover',
state === 'active' && chip.id === hoverChipId && 'is-active',
)}
aria-pressed={pressed}
disabled={disabled}
onClick={() => choose(chip.id)}
>
<span>{chip.label}</span>
<span className='cf-lib3__count'>{countFor(chip.id)}</span>
</button>
)
})}
</div>
<p className='cf-lib3__sr' aria-live='polite'>
{live}
</p>
<LayoutGroup>
{visible.length === 0 ? (
<motion.div
key={`empty-${category}`}
className='cf-lib3__empty'
initial={reduce ? false : { opacity: 0.82, y: 8 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.45, ease: EASE }}
>
<span className='cf-lib3__spot'>
<Spot src={activeCategory?.spot ?? play} size={88} />
</span>
<div className='cf-lib3__empty-copy'>
<h3 className='cf-lib3__title'>{activeCategory?.emptyTitle ?? copy.emptyTitle}</h3>
<p className='cf-lib3__detail'>{activeCategory?.emptyDetail ?? copy.emptyDetail}</p>
<button
type='button'
className='cf-lib3__sec'
disabled={disabled}
onClick={() => {
choose(emptyTarget)
chipRefs.current[emptyTarget]?.focus()
}}
>
{activeCategory?.emptyActionLabel ?? copy.emptyActionLabel}
</button>
</div>
</motion.div>
) : (
<>
<div className='cf-lib3__stairs'>
{ordered.map((col) => {
const rank = columns.indexOf(col)
const drop = stacked ? 0 : columns.length - 1 - rank
const isTop = rank === columns.length - 1
const wide = col.tiles.some((tile) => tile.id === featuredId)
const label = steps.find((s) => s.step === col.step)?.label
return (
<motion.div
key={col.step}
className={cx('cf-lib3__step', isTop && 'is-top', wide && 'is-wide')}
style={{ paddingTop: drop ? `calc(var(--lib-rise) * ${drop})` : 0 }}
layout={!reduce}
transition={{ layout: { duration: 0.32, ease: EASE } }}
>
<span className='cf-lib3__tread' aria-hidden='true' />
{label ? (
<p className='cf-lib3__cap'>
<span className='cf-lib3__num'>{col.step}</span>
<span>{label}</span>
</p>
) : null}
{col.tiles.map((tile) => {
const delay = reduce ? 0 : Math.min(order++ * 0.07, 0.28)
return (
<motion.div
key={tile.id}
className='cf-lib3__cell'
layout={!reduce}
initial={reduce ? false : { opacity: 0.82, y: 8 }}
animate={{ opacity: 1, y: 0 }}
transition={{
layout: { duration: 0.32, ease: EASE },
opacity: { duration: 0.45, ease: EASE, delay },
y: { duration: 0.45, ease: EASE, delay },
}}
>
{renderTile(tile)}
</motion.div>
)
})}
</motion.div>
)
})}
</div>
</>
)}
</LayoutGroup>
</div>
</div>
</section>
)
}
export default LinkInBio3
function useStacked(ref: React.RefObject<HTMLElement | null>) {
const [stacked, setStacked] = React.useState(false)
useIsoLayoutEffect(() => {
const el = ref.current
if (!el) return
const measure = () => setStacked(el.getBoundingClientRect().width < STACK_BELOW)
measure()
if (typeof ResizeObserver === 'undefined') {
window.addEventListener('resize', measure)
return () => window.removeEventListener('resize', measure)
}
const observer = new ResizeObserver(measure)
observer.observe(el)
return () => observer.disconnect()
}, [ref])
return stacked
}
function initials(name: string) {
return name
.split(' ')
.filter(Boolean)
.slice(0, 2)
.map((word) => word.charAt(0))
.join('')
.toUpperCase()
}
function cx(...parts: Array<string | false | null | undefined>) {
return parts.filter(Boolean).join(' ')
}
const CSS = `
.cf-lib3{
--lib-rise:clamp(44px,4.4vw,64px);
--lib-sh:var(--shadow,oklch(0.22 0.03 260));
--lib-sm:var(--shadow-sm,0 1px 1px oklch(from var(--lib-sh) l c h / .18),0 1px 3px oklch(from var(--lib-sh) l c h / .14));
--lib-md:var(--shadow-md,0 1px 2px oklch(from var(--lib-sh) l c h / .22),0 4px 10px -2px oklch(from var(--lib-sh) l c h / .2));
--lib-lg:var(--shadow-lg,0 2px 4px oklch(from var(--lib-sh) l c h / .22),0 12px 24px -8px oklch(from var(--lib-sh) l c h / .32));
--lib-focus:oklch(from var(--field-focus,var(--accent)) l c h / .55);
position:relative;isolation:isolate;overflow:clip;
background:var(--surface);color:var(--ink);font-family:var(--font-body);
font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;
padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);
}
.cf-lib3 *,.cf-lib3 *::before,.cf-lib3 *::after{box-sizing:border-box}
.cf-lib3 :where(h1,h2,h3,p){margin:0}
.cf-lib3__frame{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-lib3__inner{margin:0 auto}
.cf-lib3.is-stacked .cf-lib3__inner{max-width:36rem}
.cf-lib3__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cf-lib3__lockup{display:flex;align-items:center;gap:12px}
.cf-lib3__mono{flex:0 0 56px;width:56px;height:56px;border-radius:999px;display:grid;place-items:center;background:var(--band);color:var(--band-ink);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.3125rem;line-height:1;letter-spacing:-.01em;box-shadow:var(--lib-sm)}
.cf-lib3__logo{flex:0 0 56px;width:56px;height:56px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--lib-sh) l c h / .25))}
.cf-lib3__name{font-size:1.0625rem;font-weight:800;line-height:1.2;color:var(--ink)}
.cf-lib3__handle{margin-top:2px;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted)}
.cf-lib3__headline{margin-top:16px;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
.cf-lib3__headline mark{background:none;color:var(--accent)}
.cf-lib3__chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.cf-lib3__chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 8px 0 18px;border-radius:999px;border:1px solid var(--button-2-border,oklch(from var(--ink) l c h / .14));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));font-family:var(--button-font,var(--font-body));font-size:.9375rem;font-weight:800;line-height:1.2;cursor:pointer;box-shadow:var(--button-2-shadow,var(--lib-sm));transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.cf-lib3__count{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 8px;border-radius:999px;border:1px solid oklch(from var(--ink) l c h / .1);background:var(--card);color:var(--ink);font-size:.875rem;font-weight:800;font-variant-numeric:tabular-nums}
.cf-lib3__chip[aria-pressed='false']:not(:disabled):hover,.cf-lib3__chip.is-hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h);border-color:oklch(from var(--ink) l c h / .26)}
.cf-lib3__chip:not(:disabled):active,.cf-lib3__chip.is-active{transform:scale(.97);box-shadow:none}
.cf-lib3__chip[aria-pressed='true']{background:var(--band);border-color:var(--band);color:var(--band-ink)}
.cf-lib3__chip[aria-pressed='true']:not(:disabled):hover{background:oklch(from var(--band) calc(l + .05) c h)}
.cf-lib3__chip[aria-pressed='true'] .cf-lib3__count{background:oklch(from var(--band-ink) l c h / .16);border-color:transparent;color:var(--band-ink)}
.cf-lib3__chip:focus-visible{outline:3px solid var(--lib-focus);outline-offset:2px}
.cf-lib3__chip:disabled{cursor:not-allowed;box-shadow:none}
.cf-lib3__stairs{display:flex;align-items:flex-start;gap:12px;margin-top:32px}
.cf-lib3__step{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:12px}
.cf-lib3__step.is-wide{flex-grow:1.45}
.cf-lib3__tread{display:block;height:4px;border-radius:999px;background:oklch(from var(--ink) l c h / .14)}
.cf-lib3__step.is-top .cf-lib3__tread{background:var(--accent-fill,var(--accent))}
.cf-lib3__cap{display:flex;align-items:baseline;gap:10px;min-height:32px;font-size:.9375rem;font-weight:700;line-height:1.3;color:var(--ink);text-wrap:pretty}
.cf-lib3__num{flex:0 0 auto;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-lib3__cell{display:flex;min-width:0}
.cf-lib3__cell>*{flex:1 1 auto;min-width:0}
.cf-lib3__tile{position:relative;display:flex;flex-direction:column;gap:12px;width:100%;min-width:0;margin:0;padding:20px;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--lib-md));font:inherit;text-align:left;text-decoration:none}
.cf-lib3__tile.is-link{transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
a.cf-lib3__tile.is-link{cursor:pointer}
a.cf-lib3__tile.is-link:hover,.cf-lib3__tile.is-link.is-hover{transform:translateY(-3px);box-shadow:var(--lib-lg);border-color:oklch(from var(--ink) l c h / .22)}
a.cf-lib3__tile.is-link:active,.cf-lib3__tile.is-link.is-active{transform:translateY(0) scale(.985);box-shadow:var(--lib-sm)}
a.cf-lib3__tile.is-link:focus-visible{outline:3px solid var(--lib-focus);outline-offset:3px}
.cf-lib3__tile[aria-disabled='true']{cursor:not-allowed}
.cf-lib3__tile.is-featured{padding:24px;gap:16px;border-color:color-mix(in oklch,var(--accent) 38%,var(--card));box-shadow:var(--lib-lg)}
.cf-lib3__top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cf-lib3__spot{display:inline-flex;flex:0 0 auto;line-height:0}
.cf-lib3__tag{align-self:flex-start;display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--ink);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
.cf-lib3__media{display:flex;align-items:flex-end;justify-content:center;height:140px}
.cf-lib3__media img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 3px oklch(from var(--lib-sh) l c h / .28)) drop-shadow(0 12px 14px oklch(from var(--lib-sh) l c h / .18));transition:transform .16s ease}
a.cf-lib3__tile:hover .cf-lib3__media img,.cf-lib3__tile.is-hover .cf-lib3__media img{transform:translateY(-3px)}
.cf-lib3__body{display:flex;flex-direction:column;gap:8px}
.cf-lib3__title{display:block;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink)}
.cf-lib3__detail{display:block;color:var(--muted);text-wrap:pretty}
.cf-lib3__aside{display:block;font-size:.9375rem;font-style:italic;font-weight:500;line-height:1.4;color:var(--ink);text-wrap:pretty}
.cf-lib3__foot{margin-top:auto;padding-top:4px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.cf-lib3__price{font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--ink)}
.cf-lib3__sec{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border-radius:var(--button-radius,var(--radius,12px));border:1px solid var(--button-2-border,transparent);background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm,var(--lib-sm)));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-lib3__foot .cf-lib3__sec{flex:1 1 auto}
.cf-lib3:not(.is-stacked) .cf-lib3__foot .cf-lib3__sec{flex-basis:100%;padding:0 10px;font-size:1rem}
.cf-lib3 button.cf-lib3__sec{cursor:pointer}
a.cf-lib3__tile:hover .cf-lib3__sec,.cf-lib3__tile.is-hover .cf-lib3__sec,.cf-lib3 button.cf-lib3__sec:not(:disabled):hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-lib3 button.cf-lib3__sec:not(:disabled):active{transform:translateY(1px);box-shadow:none}
.cf-lib3 button.cf-lib3__sec:focus-visible{outline:3px solid var(--lib-focus);outline-offset:3px}
.cf-lib3 button.cf-lib3__sec:disabled,.cf-lib3__tile[aria-disabled='true'] .cf-lib3__sec{cursor:not-allowed;box-shadow:none;background:color-mix(in oklch,var(--ink) 4%,var(--card));color:var(--muted)}
.cf-lib3__sec.is-full{width:100%;min-height:56px;margin-top:4px}
.cf-lib3__spin{animation:cf-lib3-spin .8s linear infinite}
.cf-lib3__stage{position:relative;aspect-ratio:1;overflow:hidden;border-radius:12px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-lib3__stage-img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center 62%}
.cf-lib3__stage-spot{position:absolute;inset:0;display:grid;place-items:center}
.cf-lib3__flag{position:absolute;top:12px;left:12px;z-index:2;display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:var(--band);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.2;box-shadow:var(--lib-sm)}
.cf-lib3__tagprice{position:absolute;top:12px;right:12px;z-index:2;display:inline-flex;align-items:center;min-height:48px;padding:6px 14px;border-radius:var(--radius,12px);background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-family:var(--font-display);font-weight:800;font-size:clamp(1.75rem,2.4vw,2.25rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;white-space:nowrap;box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--accent)) calc(l + .14) c h / .6),0 1px 2px oklch(from var(--lib-sh) l c h / .3),0 6px 12px -4px oklch(from var(--lib-sh) l c h / .4);animation:cf-lib3-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-lib3__commit{position:relative;display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card));color:var(--ink);font-size:.9375rem;font-weight:600;line-height:1.4;cursor:pointer;text-wrap:pretty}
.cf-lib3__commit input{position:absolute;left:14px;top:12px;width:24px;height:24px;margin:0;opacity:0;cursor:pointer}
.cf-lib3__box{flex:0 0 24px;width:24px;height:24px;margin-top:-2px;display:grid;place-items:center;border-radius:6px;border:2px solid color-mix(in oklch,var(--field-ink) 50%,var(--field));background:var(--field);color:transparent;transition:background .16s ease,border-color .16s ease}
.cf-lib3__commit input:checked+.cf-lib3__box{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-lib3__commit input:focus-visible+.cf-lib3__box{outline:3px solid var(--lib-focus);outline-offset:2px}
.cf-lib3__commit:has(input:disabled){cursor:not-allowed}
.cf-lib3__buy{display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;padding:12px 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--lib-sh) l c h / .3),0 8px 16px -6px oklch(from var(--lib-sh) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-lib3__buy:not(:disabled):hover,.cf-lib3__buy.is-hover{background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .18) c h),0 1px 2px oklch(from var(--lib-sh) l c h / .32),0 12px 20px -6px oklch(from var(--lib-sh) l c h / .5))}
.cf-lib3__buy:not(:disabled):active,.cf-lib3__buy.is-active{transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--lib-sh) l c h / .35),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 1px oklch(from var(--lib-sh) l c h / .3)}
.cf-lib3__buy:focus-visible{outline:3px solid var(--lib-focus);outline-offset:3px}
.cf-lib3__buy:disabled{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none}
.cf-lib3__note{margin-top:-4px;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-align:center;text-wrap:pretty}
.cf-lib3__note svg,.cf-lib3__error svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-lib3__form{display:flex;flex-direction:column;gap:8px}
.cf-lib3__label{font-size:1rem;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-lib3__input{width:100%;min-height:56px;padding:0 16px;border-radius:var(--field-radius,var(--radius,12px));border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));background:var(--field);color:var(--field-ink);font-family:var(--font-body);font-size:1.0625rem;box-shadow:inset 0 1px 2px oklch(from var(--lib-sh) l c h / .08);transition:border-color .16s ease,box-shadow .16s ease}
.cf-lib3__input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-lib3__input:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-lib3__input[aria-invalid='true']{border-color:var(--danger)}
.cf-lib3__input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-lib3__input:disabled{cursor:not-allowed}
.cf-lib3__error{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
.cf-lib3__privacy{font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-lib3__empty{display:flex;align-items:center;gap:24px;max-width:46rem;margin-top:32px;padding:clamp(20px,3vw,32px);background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--lib-md))}
.cf-lib3__empty-copy{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.cf-lib3__empty-copy .cf-lib3__sec{margin-top:8px}
.cf-lib3.is-stacked .cf-lib3__stairs{flex-direction:column;gap:24px}
.cf-lib3.is-stacked .cf-lib3__step{flex:none}
.cf-lib3.is-stacked .cf-lib3__tread,.cf-lib3.is-stacked .cf-lib3__num{display:none}
.cf-lib3.is-stacked .cf-lib3__cap{min-height:0}
.cf-lib3.is-stacked .cf-lib3__tile.is-featured{padding:20px}
.cf-lib3.is-stacked .cf-lib3__stage{aspect-ratio:4/3}
.cf-lib3.is-stacked .cf-lib3__empty{flex-direction:column;align-items:flex-start}
@keyframes cf-lib3-pop{from{scale:.9}to{scale:1}}
@keyframes cf-lib3-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
.cf-lib3__chip,.cf-lib3__tile.is-link,.cf-lib3__sec,.cf-lib3__buy,.cf-lib3__box,.cf-lib3__input,.cf-lib3__media img{transition:none}
.cf-lib3__tagprice,.cf-lib3__spin{animation:none}
a.cf-lib3__tile.is-link:hover,.cf-lib3__tile.is-link.is-hover{transform:none}
a.cf-lib3__tile:hover .cf-lib3__media img,.cf-lib3__tile.is-hover .cf-lib3__media img{transform:none}
}
`
pieces/content/link-in-bio-3/specimen.tsx 98 lines
import __studioImageb4e1413a from "../assets/36164e0e38c69cc3.webp";
import __studioImagead6ea328 from "../assets/0d43f8c71e65cbb4.webp";
import * as React from 'react'
import { LinkInBio3 } from '../link-in-bio-3'
import type { LinkInBio3Tile } from '../link-in-bio-3'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error'] as const
type SpecimenState = (typeof states)[number]
export default function LinkInBio3Specimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample
const tiles: LinkInBio3Tile[] = [
{
id: 'hearth',
category: 'shop',
step: 4,
featured: true,
flag: 'Bestseller',
title: 'The Hearth Candle',
detail: 'Three wicks of cedar and smoked vanilla, poured by hand in small batches.',
price: sample.price,
image: slot(
'product',
__studioImageb4e1413a,
),
imageAlt: 'The Hearth Candle, a lit three-wick candle in an amber glass tumbler',
commitLabel: `I understand I’m covered by the ${sample.guarantee}.`,
actionLabel: 'Bring the Hearth home',
note: 'Secure checkout · Hand-poured to order',
href: '#hearth',
},
{
id: 'travel-tins',
category: 'shop',
step: 3,
title: 'Travel Tin Trio',
detail: 'Three small tins to find your scent before you commit.',
price: sample.items[1].value,
image: slot(
'item-1',
__studioImagead6ea328,
),
imageAlt: 'Three small brushed-steel travel candle tins',
actionLabel: 'Shop the trio',
href: '#travel-tins',
},
{
id: 'gift-card',
category: 'shop',
step: 3,
title: 'Fernhouse Gift Card',
detail: 'Let them choose their own slow evening.',
price: sample.items[2].value,
actionLabel: 'Send a gift card',
href: '#gift-card',
},
{
id: 'sunday-notes',
category: 'learn',
step: 2,
kind: 'newsletter',
title: 'Get the Sunday notes',
detail: 'One short email with new scents first, plus one care tip.',
tag: 'Free · weekly',
actionLabel: 'Get the notes',
},
{
id: 'burn-guide',
category: 'learn',
step: 1,
kind: 'guide',
title: 'How to burn a candle right',
detail: 'The first-burn rule, wick trims and the four-hour limit.',
tag: 'Free guide',
aside: '(I tunnelled my first dozen candles. This is how I stopped.)',
actionLabel: 'Read the guide',
href: '#burn-guide',
},
]
return (
<LinkInBio3
name='Fernhouse Candles'
handle='@fernhousecandles'
headline={
<>
Burn it right. <mark>Love it longer.</mark>
</>
}
logoImage={slot('logo', '')}
tiles={tiles}
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
name OptionalLinkInBio3 |
string |
|
handle OptionalLinkInBio3 |
string |
|
headline OptionalLinkInBio3 |
React.ReactNode |
|
logoImage OptionalLinkInBio3 |
string |
|
logoAlt OptionalLinkInBio3 |
string |
|
tiles OptionalLinkInBio3 |
LinkInBio3Tile[] |
|
categories OptionalLinkInBio3 |
LinkInBio3Category[] |
|
steps OptionalLinkInBio3 |
LinkInBio3Step[] |
|
copy OptionalLinkInBio3 |
Partial<LinkInBio3Copy> |
|
headingLevel OptionalLinkInBio3 |
1 | 2 |
|
initialCategory OptionalLinkInBio3 |
string |
|
loading OptionalLinkInBio3 |
boolean |
|
onAction OptionalLinkInBio3 |
(tile: LinkInBio3Tile, index: number) => void |
|
onSubmit OptionalLinkInBio3 |
(values: { email: string }) => void |
|
onCategoryChange OptionalLinkInBio3 |
(category: string) => void |
|
state OptionalLinkInBio3 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalLinkInBio3 |
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.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
logo- The brand’s logo mark.
product- The main product shot or cover (ebook, kit, bottle).
-
0d43f8c71e65cbb4.webp
image/webp · 96.3 KB
-
2c539f422023a290.webp
image/webp · 115 KB
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
36164e0e38c69cc3.webp
image/webp · 49.8 KB
-
63571cb07acc4626.webp
image/webp · 17.3 KB
-
839cc020060f63a3.webp
image/webp · 9.49 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
bc3d360c88eeac0e.webp
image/webp · 23.9 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB