Link In Bio 1
Link-in-bio block: each creator link is a stop on one route from "you are here" to "your first funnel, live".
Use it in a prompt
Use content/link-in-bio 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.tsx. - Import it and pass your copy and images (Props tab):
import { LinkInBio } from "@/components/funneldna/content/link-in-bio"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/link-in-bio/component.tsx 716 lines
// layout: route-map
// Link-in-bio block: each creator link is a stop on one route from "you are here" to "your first funnel, live".
// The paid offer is the big emphasised stop, and an inline email capture sits just before the finish line.
// Theme: every colour, face, radius and shadow reads the theme-contract tokens (no documented exceptions;
// social glyphs are monochrome currentColor icons, not official marks).
import * as React from "react"
import { AlertCircle, Clapperboard, Flag, Globe, Link2, Loader2, Lock, Mail, MapPin, Mic, Package, Presentation } from "lucide-react"
import type { LucideIcon } from "lucide-react"
export type LinkInBioKind = "lead" | "offer" | "podcast" | "video" | "link"
export type LinkInBioNetwork = "instagram" | "youtube" | "linkedin" | "facebook" | "podcast" | "email" | "website"
export type LinkInBioLink = {
/** Link text. On the primary stop this is the product name. */
title: React.ReactNode
detail?: React.ReactNode
href?: string
/** Picks the route marker icon. */
kind?: LinkInBioKind
/** Short tag on the right of a regular stop ("Free", "Listen", "Watch"). */
tag?: string
/** Emphasise this stop as the featured offer. The first primary link wins. */
primary?: boolean
/** Featured stop only: small flag above the question. */
flag?: string
/** Featured stop only: the question the button answers. */
question?: React.ReactNode
/** Featured stop only: product slot image (transparent cut-out works best). */
image?: string
imageAlt?: string
price?: string
/** Words after the price, e.g. "today. That's it." */
priceLine?: string
priceNote?: string
reasonsTitle?: string
reasons?: React.ReactNode[]
/** Featured stop only: the button label (the answer to the question). */
label?: string
/** Featured stop only: one reassurance line under the button. */
sublabel?: string
}
export type LinkInBioSocial = {
network: LinkInBioNetwork
href: string
/** Accessible name, e.g. "Maya on Instagram". */
label: string
}
export type LinkInBioMilestone = { title: string; detail?: string }
export type LinkInBioCopy = {
routeLabel: string
/** Template: {name} is replaced with the creator's name. */
socialsLabel: string
primaryLabel: 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 LinkInBioProps = {
name?: string
handle?: string
role?: string
/** The one-line promise. Wrap the key phrase in <mark> for the highlighter stroke. */
headline?: React.ReactNode
lead?: React.ReactNode
/** Slot: presenter. */
presenterImage?: string
presenterAlt?: string
/** 4 to 8 links. Mark one as primary. */
links?: LinkInBioLink[]
socials?: LinkInBioSocial[]
/** First milestone on the route (where the visitor is now). */
start?: LinkInBioMilestone
/** Last milestone on the route (the result). */
finish?: LinkInBioMilestone
showEmailCapture?: boolean
emailTitle?: React.ReactNode
emailLead?: React.ReactNode
copy?: Partial<LinkInBioCopy>
/** 1 when this block is the page's first screen, 2 when it sits under another hero. */
headingLevel?: 1 | 2
/** Shows a spinner on the email button while the builder handles the submit. */
loading?: boolean
onAction?: (link: LinkInBioLink, index: number) => void
onSubmit?: (values: { email: string }) => void
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
const KIND_ICON: Record<LinkInBioKind, LucideIcon> = {
lead: Presentation,
offer: Package,
podcast: Mic,
video: Clapperboard,
link: Link2,
}
const DEFAULT_COPY: LinkInBioCopy = {
routeLabel: "Your route from first idea to a live funnel",
socialsLabel: "Follow {name}",
primaryLabel: "I'm ready, show me how",
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: "Send me the notes",
submittingLabel: "Sending",
privacy: "We respect your inbox. Unsubscribe anytime.",
}
const DEFAULT_START: LinkInBioMilestone = { title: "You are here", detail: "An offer idea and no funnel yet." }
const DEFAULT_FINISH: LinkInBioMilestone = { title: "Your first funnel, live", detail: "Planned, written and checked before you launch." }
const DEFAULT_LINKS: LinkInBioLink[] = [
{ kind: "lead", title: "Funnel Starter Workshop", detail: "Map out your first funnel, free and on demand.", tag: "Free", href: "#workshop" },
{
kind: "offer",
primary: true,
flag: "My top pick",
question: "Ready to map your first funnel?",
title: "The Funnel Starter Kit",
detail: "Funnel Planning Guide · Page Copy Workbook · Launch Checklist",
price: "$47",
priceLine: "today. That's it.",
priceNote: "One payment · Lifetime access",
reasonsTitle: "Three reasons it's $47 today",
reasons: [
"Three tools in one kit: guide, workbook and checklist",
"Plan, write and check every page before you launch",
"A 30-day money-back guarantee covers it",
],
label: "I'm ready, show me how",
sublabel: "Secure checkout · Instant download",
href: "#checkout",
},
{ kind: "podcast", title: "The First Funnel Podcast", detail: "Short episodes on offers, pages and launch day.", tag: "Listen", href: "#podcast" },
{ kind: "video", title: "Latest video: plan your funnel on one page", detail: "Watch the walkthrough on YouTube.", tag: "Watch", href: "#video" },
]
const EMAIL_PATTERN = /^[^@ ]+@[^@ ]+[.][^@ ]+$/
const useIsoLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect
export function LinkInBio(props: LinkInBioProps) {
const {
name = "Maya Brooks",
handle,
role = "Funnel coach",
headline = "Build your first funnel with a clear plan",
lead = "Plan your funnel, write your page copy, and check every step before you launch.",
presenterImage,
presenterAlt,
links = DEFAULT_LINKS,
socials = [],
start = DEFAULT_START,
finish = DEFAULT_FINISH,
showEmailCapture = true,
emailTitle = "Get the next step in your inbox",
emailLead = "Short, practical notes on offers, pages and launch day.",
copy,
headingLevel = 1,
loading = false,
onAction,
onSubmit,
state = "default",
className,
} = props
const c: LinkInBioCopy = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const inputId = `${uid}-email`
const errorId = `${uid}-error`
const captureTitleId = `${uid}-capture`
const featureTitleId = `${uid}-feature`
const disabled = state === "disabled"
const H: "h1" | "h2" = headingLevel === 2 ? "h2" : "h1"
const Sub: "h2" | "h3" = headingLevel === 2 ? "h3" : "h2"
// Route nodes: 0 = start, 1..n = links, then the email capture, then the finish milestone.
const primaryIndex = links.findIndex((l) => l.primary)
const captureNode = showEmailCapture ? links.length + 1 : -1
const finishNode = links.length + (showEmailCapture ? 2 : 1)
const nodeCount = finishNode + 1
const restNode = primaryIndex >= 0 ? primaryIndex + 1 : 0
// Signature interaction: hovering or focusing a stop fills the route up to that stop.
const [hoverNode, setHoverNode] = React.useState<number | null>(null)
const activeNode = hoverNode ?? restNode
const mapRef = React.useRef<HTMLDivElement>(null)
const discs = React.useRef<Array<HTMLSpanElement | null>>([])
const [centers, setCenters] = React.useState<number[]>([])
useIsoLayoutEffect(() => {
const map = mapRef.current
if (!map) return
const measure = () => {
const next = discs.current.slice(0, nodeCount).map((d) => {
if (!d) return 0
const row = d.offsetParent as HTMLElement | null
return (row && row !== map ? row.offsetTop : 0) + d.offsetTop + d.offsetHeight / 2
})
setCenters((prev) =>
prev.length === next.length && prev.every((v, i) => Math.abs(v - next[i]) < 0.5) ? prev : next,
)
}
measure()
if (typeof ResizeObserver === "undefined") return
const ro = new ResizeObserver(measure)
ro.observe(map)
return () => ro.disconnect()
}, [nodeCount, links, showEmailCapture])
const measured = centers.length === nodeCount && centers[nodeCount - 1] > centers[0]
const trackStyle: React.CSSProperties | undefined = measured
? { top: centers[0], height: centers[nodeCount - 1] - centers[0] }
: undefined
const fillStyle: React.CSSProperties = measured
? { top: centers[0], height: Math.max(0, (centers[activeNode] ?? centers[0]) - centers[0]) }
: { height: 0 }
// Email capture: inline validation, no success screen (the builder wires what happens next).
const [email, setEmail] = React.useState("")
const [error, setError] = React.useState<string | null>(null)
React.useEffect(() => {
if (state === "error") {
setEmail((v) => v || c.errorSample)
setError(c.emailInvalid)
} else {
setError(null)
}
}, [state, c.emailInvalid, c.errorSample])
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault()
if (disabled || loading) return
const value = email.trim()
if (!value) {
setError(c.emailRequired)
return
}
if (!EMAIL_PATTERN.test(value)) {
setError(c.emailInvalid)
return
}
setError(null)
onSubmit?.({ email: value })
}
const rowProps = (node: number, extra: string) => ({
className: ["cf-lib-row", extra, node <= activeNode ? "is-reached" : "", node === activeNode ? "is-current" : ""]
.filter(Boolean)
.join(" "),
style: { "--i": node } as React.CSSProperties,
onPointerEnter: (e: React.PointerEvent) => {
if (e.pointerType !== "touch") setHoverNode(node)
},
onFocus: () => setHoverNode(node),
})
const disc = (node: number, Icon: LucideIcon) => (
<span
className="cf-lib-disc"
aria-hidden="true"
ref={(el) => {
discs.current[node] = el
}}
>
<Icon size={20} strokeWidth={2.5} />
</span>
)
// Literal class names (same strings as before) so the primary button resolves to the .cf-lib-btn rule.
const btnClass =
state === "hover" ? "cf-lib-btn is-hover" : state === "active" ? "cf-lib-btn is-active" : "cf-lib-btn"
return (
<section className={["cf-link-in-bio", className].filter(Boolean).join(" ")}>
<style>{CSS}</style>
<div className="cf-lib-inner">
<header className="cf-lib-profile">
<div className={presenterImage ? "cf-lib-portrait" : "cf-lib-portrait is-initials"}>
{presenterImage ? (
<img src={presenterImage} alt={presenterAlt ?? name} width={640} height={640} />
) : (
<span className="cf-lib-initials" aria-hidden="true">
{initials(name)}
</span>
)}
</div>
<div className="cf-lib-id">
<p className="cf-lib-name">
{name}
{handle ? <span className="cf-lib-handle">{handle}</span> : null}
</p>
{role ? <p className="cf-lib-role">{role}</p> : null}
</div>
<H className="cf-lib-headline">{headline}</H>
{lead ? <p className="cf-lib-lead">{lead}</p> : null}
{socials.length > 0 ? (
<ul className="cf-lib-socials" aria-label={c.socialsLabel.split("{name}").join(name)}>
{socials.map((s, k) => (
<li key={k}>
<a className="cf-lib-social" href={s.href} aria-label={s.label}>
<SocialGlyph network={s.network} />
</a>
</li>
))}
</ul>
) : null}
</header>
<div
className="cf-lib-map"
ref={mapRef}
onPointerLeave={() => setHoverNode(null)}
onBlur={(e) => {
if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setHoverNode(null)
}}
>
<span className="cf-lib-track" aria-hidden="true" style={trackStyle} />
<span className="cf-lib-fill" aria-hidden="true" style={fillStyle} />
<ol className="cf-lib-route" aria-label={c.routeLabel}>
<li {...rowProps(0, "cf-lib-row--mile")}>
{disc(0, MapPin)}
<div className="cf-lib-body cf-lib-mile">
<p className="cf-lib-mile-title">{start.title}</p>
{start.detail ? <p className="cf-lib-mile-detail">{start.detail}</p> : null}
</div>
</li>
{links.map((link, i) => {
const node = i + 1
const isFeature = i === primaryIndex
const Icon = KIND_ICON[link.kind ?? (isFeature ? "offer" : "link")]
const act = () => onAction?.(link, i)
if (isFeature) {
const label = link.label ?? c.primaryLabel
return (
<li key={i} {...rowProps(node, "cf-lib-row--feature")}>
{disc(node, Icon)}
<article className="cf-lib-body cf-lib-feature" aria-labelledby={featureTitleId}>
{link.flag ? <span className="cf-lib-flag">{link.flag}</span> : null}
<Sub className="cf-lib-q" id={featureTitleId}>
{link.question ?? link.title}
</Sub>
<div className={link.image ? "cf-lib-product" : "cf-lib-product is-plain"}>
{link.image ? (
<img src={link.image} alt={link.imageAlt ?? ""} width={192} height={192} loading="lazy" />
) : null}
<div>
<p className="cf-lib-pname">{link.title}</p>
{link.detail ? <p className="cf-lib-pdetail">{link.detail}</p> : null}
</div>
</div>
{link.price ? (
<div className="cf-lib-price">
<p className="cf-lib-price-line">
<span className="cf-lib-price-num">{link.price}</span>
{link.priceLine ? <span className="cf-lib-price-tail">{link.priceLine}</span> : null}
</p>
{link.priceNote ? <p className="cf-lib-price-note">{link.priceNote}</p> : null}
</div>
) : null}
{link.reasons && link.reasons.length > 0 ? (
<div className="cf-lib-reasons">
{link.reasonsTitle ? <p className="cf-lib-reasons-title">{link.reasonsTitle}</p> : null}
<ol>
{link.reasons.map((r, k) => (
<li key={k}>
<span className="cf-lib-reason-n" aria-hidden="true">
{k + 1}
</span>
<span>{r}</span>
</li>
))}
</ol>
</div>
) : null}
{link.href && !disabled ? (
<a className={btnClass} href={link.href} onClick={act}>
{label}
</a>
) : (
<button type="button" className={btnClass} disabled={disabled} onClick={act}>
{label}
</button>
)}
{link.sublabel ? (
<p className="cf-lib-reassure">
<Lock className="cf-lib-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{link.sublabel}
</p>
) : null}
</article>
</li>
)
}
const inner = (
<>
<span className="cf-lib-link-text">
<span className="cf-lib-link-title">{link.title}</span>
{link.detail ? <span className="cf-lib-link-detail">{link.detail}</span> : null}
</span>
{link.tag ? <span className="cf-lib-tag">{link.tag}</span> : null}
</>
)
return (
<li key={i} {...rowProps(node, "cf-lib-row--link")}>
{disc(node, Icon)}
<div className="cf-lib-body">
{link.href ? (
<a className="cf-lib-link" href={link.href} onClick={act}>
{inner}
</a>
) : (
<button type="button" className="cf-lib-link" onClick={act}>
{inner}
</button>
)}
</div>
</li>
)
})}
{showEmailCapture ? (
<li {...rowProps(captureNode, "cf-lib-row--capture")}>
{disc(captureNode, Mail)}
<div className="cf-lib-body cf-lib-capture">
<Sub className="cf-lib-capture-title" id={captureTitleId}>
{emailTitle}
</Sub>
{emailLead ? <p className="cf-lib-capture-lead">{emailLead}</p> : null}
<form className="cf-lib-form" noValidate onSubmit={handleSubmit} aria-labelledby={captureTitleId}>
<label className="cf-lib-label" htmlFor={inputId}>
{c.emailLabel}
</label>
<input
id={inputId}
className="cf-lib-input"
type="email"
name="email"
autoComplete="email"
inputMode="email"
placeholder={c.emailPlaceholder}
value={email}
disabled={disabled}
aria-invalid={error ? true : undefined}
aria-describedby={error ? errorId : undefined}
onChange={(e) => {
setEmail(e.target.value)
if (error) setError(null)
}}
/>
{error ? (
<p className="cf-lib-error" id={errorId} role="alert">
<AlertCircle className="cf-lib-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{error}
</p>
) : null}
<button
type="submit"
className={loading ? "cf-lib-btn cf-lib-btn--form is-loading" : "cf-lib-btn cf-lib-btn--form"}
disabled={disabled}
aria-busy={loading || undefined}
>
{loading ? (
<>
<Loader2 className="cf-lib-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{c.submittingLabel}</span>
</>
) : (
c.submitLabel
)}
</button>
<p className="cf-lib-privacy">
<Lock className="cf-lib-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{c.privacy}
</p>
</form>
</div>
</li>
) : null}
<li {...rowProps(finishNode, "cf-lib-row--mile")}>
{disc(finishNode, Flag)}
<div className="cf-lib-body cf-lib-mile">
<p className="cf-lib-mile-title">{finish.title}</p>
{finish.detail ? <p className="cf-lib-mile-detail">{finish.detail}</p> : null}
</div>
</li>
</ol>
</div>
</div>
</section>
)
}
export default LinkInBio
function initials(name: string) {
return name
.split(" ")
.filter(Boolean)
.slice(0, 2)
.map((p) => p.charAt(0).toUpperCase())
.join("")
}
// Monochrome social glyphs: lucide path data inline, drawn in currentColor so they follow the theme.
function SocialGlyph({ network }: { network: LinkInBioNetwork }) {
const p: React.SVGProps<SVGSVGElement> = {
width: 20,
height: 20,
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: 2.5,
strokeLinecap: "round",
strokeLinejoin: "round",
"aria-hidden": true,
}
switch (network) {
case "instagram":
return (
<svg {...p}>
<rect width="20" height="20" x="2" y="2" rx="5" ry="5" />
<path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" />
<line x1="17.5" x2="17.51" y1="6.5" y2="6.5" />
</svg>
)
case "youtube":
return (
<svg {...p}>
<path d="M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17" />
<path d="m10 15 5-3-5-3z" />
</svg>
)
case "linkedin":
return (
<svg {...p}>
<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
<rect width="4" height="12" x="2" y="9" />
<circle cx="4" cy="4" r="2" />
</svg>
)
case "facebook":
return (
<svg {...p}>
<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" />
</svg>
)
case "podcast":
return <Mic size={20} strokeWidth={2.5} aria-hidden="true" />
case "email":
return <Mail size={20} strokeWidth={2.5} aria-hidden="true" />
default:
return <Globe size={20} strokeWidth={2.5} aria-hidden="true" />
}
}
const CSS = `
.cf-link-in-bio{
--lib-rail:56px;--lib-disc:40px;--lib-track:8px;--lib-ease:cubic-bezier(.2,.7,.2,1);
--lib-line:color-mix(in oklch,var(--ink) 11%,var(--surface));
--lib-fill:var(--accent-fill,var(--accent));
--lib-shadow:var(--shadow,oklch(.22 .03 260));
position:relative;box-sizing:border-box;width:100%;overflow-x:clip;
padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);
background:var(--surface);color:var(--ink);font-family:var(--font-body);
}
.cf-link-in-bio *,.cf-link-in-bio *::before,.cf-link-in-bio *::after{box-sizing:border-box}
.cf-lib-inner{max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1fr);gap:clamp(32px,5vw,72px);align-items:start}
.cf-lib-profile{display:flex;flex-direction:column;align-items:flex-start;animation:cf-lib-rise .45s var(--lib-ease) both}
.cf-lib-portrait{position:relative;width:100%;aspect-ratio:1/1;max-height:400px;border-radius:12px;overflow:hidden;display:grid;place-items:center;background:color-mix(in oklch,var(--ink) 6%,var(--surface))}
.cf-lib-portrait.is-initials{background:var(--lib-fill)}
.cf-lib-portrait img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 28%}
.cf-lib-initials{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;color:var(--accent-fill-ink,var(--card))}
.cf-lib-id{margin-top:24px}
.cf-lib-name{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.3;color:var(--ink)}
.cf-lib-handle{margin-inline-start:.5em;font-weight:600;color:var(--muted)}
.cf-lib-role{margin:4px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-lib-headline{margin:16px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
.cf-lib-headline mark{color:inherit;padding:0 .06em;margin:0 -.02em;border-radius:.12em .32em .2em .36em;background:linear-gradient(176deg,transparent 0 50%,color-mix(in oklch,var(--marker,#fae37c) 78%,transparent) 50% 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-lib-lead{margin:16px 0 0;max-width:34rem;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-lib-socials{list-style:none;margin:24px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.cf-lib-social{display:grid;place-items:center;width:44px;height:44px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--surface));color:var(--ink);text-decoration:none;transition:transform .16s ease,background-color .16s ease}
.cf-lib-social:hover{background:color-mix(in oklch,var(--ink) 12%,var(--surface));transform:translateY(-2px)}
.cf-lib-social:active{transform:translateY(0)}
.cf-lib-social:focus-visible,.cf-lib-link:focus-visible,.cf-lib-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-lib-map{position:relative}
.cf-lib-track,.cf-lib-fill{position:absolute;z-index:0;left:calc(var(--lib-rail) / 2 - var(--lib-track) / 2);width:var(--lib-track);border-radius:999px;pointer-events:none}
.cf-lib-track{top:20px;bottom:20px;background:var(--lib-line)}
.cf-lib-fill{top:20px;height:0;background:var(--lib-fill);transition:height .45s var(--lib-ease)}
.cf-lib-route{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px}
.cf-lib-row{position:relative;display:grid;grid-template-columns:var(--lib-rail) minmax(0,1fr);column-gap:12px;align-items:start;animation:cf-lib-rise .45s var(--lib-ease) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
.cf-lib-row--link{--lib-disc-top:18px}
.cf-lib-row--feature{--lib-disc-top:30px}
.cf-lib-row--capture{--lib-disc-top:28px}
.cf-lib-disc{position:relative;z-index:1;grid-column:1;justify-self:center;display:grid;place-items:center;width:var(--lib-disc);height:var(--lib-disc);margin-top:var(--lib-disc-top,0px);border-radius:999px;border:1px solid oklch(from var(--ink) l c h / .14);background:var(--card);color:var(--muted);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--lib-shadow) l c h / .22));transition:background-color .3s ease,border-color .3s ease,color .3s ease,transform .3s var(--lib-ease)}
.cf-lib-row.is-reached .cf-lib-disc{background:var(--lib-fill);border-color:var(--lib-fill);color:var(--accent-fill-ink,var(--card))}
.cf-lib-row.is-current .cf-lib-disc{transform:scale(1.1)}
.cf-lib-body{grid-column:2;min-width:0}
.cf-lib-mile{padding-top:var(--lib-mile-top,8px)}
.cf-lib-mile-title{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.3;color:var(--ink)}
.cf-lib-mile-detail{margin:2px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-lib-link{--lib-tag-bg:var(--button-2-bg,var(--secondary,color-mix(in oklch,var(--ink) 7%,var(--card))));--lib-tag-ink:var(--button-2-ink,var(--secondary-ink,var(--ink)));display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:76px;margin:0;padding:18px 22px;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(--shadow-md,0 1px 2px oklch(from var(--lib-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--lib-shadow) l c h / .18)));font:inherit;text-align:left;text-decoration:none;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.cf-lib-link:hover{transform:translateY(-2px);border-color:oklch(from var(--accent) l c h / .5);box-shadow:var(--shadow-lg,0 2px 3px oklch(from var(--lib-shadow) l c h / .24),0 10px 18px -6px oklch(from var(--lib-shadow) l c h / .28))}
.cf-lib-link:active{transform:translateY(0);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--lib-shadow) l c h / .22))}
.cf-lib-link-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.cf-lib-link-title{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink);text-wrap:balance}
.cf-lib-link-detail{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;color:var(--muted);text-wrap:pretty}
.cf-lib-tag{flex:0 0 auto;display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border-radius:999px;background:var(--lib-tag-bg);color:var(--lib-tag-ink);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap;transition:background-color .16s ease,color .16s ease}
.cf-lib-link:hover .cf-lib-tag,.cf-lib-link:focus-visible .cf-lib-tag{background:var(--lib-fill);color:var(--accent-fill-ink,var(--card))}
.cf-lib-feature{padding:clamp(20px,3vw,32px);background:var(--card);color:var(--ink);border:1px solid oklch(from var(--accent) l c h / .6);border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--shadow-lg,0 2px 3px oklch(from var(--lib-shadow) l c h / .24),0 10px 18px -6px oklch(from var(--lib-shadow) l c h / .28))}
.cf-lib-flag{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:var(--lib-fill);color:var(--accent-fill-ink,var(--card));font-size:.875rem;font-weight:800;line-height:1.2}
.cf-lib-q{margin:12px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink)}
.cf-lib-product{margin-top:20px;display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px;align-items:center}
.cf-lib-product.is-plain{grid-template-columns:minmax(0,1fr)}
.cf-lib-product img{display:block;width:96px;height:96px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--lib-shadow) l c h / .28)) drop-shadow(0 10px 12px oklch(from var(--lib-shadow) l c h / .2))}
.cf-lib-pname{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.3;color:var(--ink)}
.cf-lib-pdetail{margin:4px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-lib-price{margin-top:20px}
.cf-lib-price-line{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;column-gap:12px;row-gap:4px}
.cf-lib-price-num{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-.03em;font-variant-numeric:tabular-nums;font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;color:var(--ink)}
.cf-lib-price-tail{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.2;color:var(--ink)}
.cf-lib-price-note{margin:12px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
.cf-lib-reasons{margin-top:20px;padding:16px 18px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-lib-reasons-title{margin:0;font-size:.9375rem;font-weight:800;line-height:1.4;color:var(--ink)}
.cf-lib-reasons ol{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
.cf-lib-reasons li{display:grid;grid-template-columns:1.25rem minmax(0,1fr);gap:10px;align-items:baseline;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4;color:var(--ink);text-wrap:pretty}
.cf-lib-reason-n{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.25rem;line-height:1;font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-lib-feature .cf-lib-btn{margin-top:24px}
.cf-lib-reassure,.cf-lib-privacy{margin:12px 0 0;text-align:center;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-lib-inline-icon{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-lib-btn{
--lib-b:var(--button-bg,var(--cta));--lib-b2:var(--button-bg-2,var(--cta-2));
display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:64px;margin:0;padding:12px 28px;
border:0;border-radius:var(--button-radius,var(--radius,12px));
background:linear-gradient(oklch(from var(--lib-b) calc(l + .04) c h),oklch(from var(--lib-b2) calc(l - .02) c h));
color:var(--button-ink,var(--cta-ink));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;text-shadow:var(--button-text-shadow,none);cursor:pointer;
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--lib-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--lib-b) calc(l - .16) c h),0 1px 2px oklch(from var(--lib-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--lib-shadow) l c h / .45));
transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-lib-btn:hover:not(:disabled),.cf-lib-btn.is-hover{background:linear-gradient(oklch(from var(--lib-b) calc(l - .01) c h),oklch(from var(--lib-b2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--lib-b) calc(l + .12) c h / .6),inset 0 -3px 0 oklch(from var(--lib-b) calc(l - .2) c h),0 1px 2px oklch(from var(--lib-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--lib-shadow) l c h / .52)}
.cf-lib-btn:active:not(:disabled),.cf-lib-btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--lib-b) calc(l - .05) c h),oklch(from var(--lib-b2) calc(l - .09) c h));box-shadow:inset 0 2px 3px oklch(from var(--lib-b) calc(l - .24) c h / .5),inset 0 -2px 0 oklch(from var(--lib-b) calc(l - .18) c h),0 1px 1px oklch(from var(--lib-shadow) l c h / .28)}
.cf-lib-btn:disabled{cursor:not-allowed;transform:none;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--lib-shadow) l c h / .22)))}
.cf-lib-btn.is-loading{cursor:progress}
.cf-lib-btn--form{min-height:56px;margin-top:12px}
.cf-lib-spin{animation:cf-lib-spin .8s linear infinite}
.cf-lib-capture{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(--shadow-md,0 1px 2px oklch(from var(--lib-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--lib-shadow) l c h / .18)))}
.cf-lib-capture-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink)}
.cf-lib-capture-lead{margin:8px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;color:var(--muted);text-wrap:pretty}
.cf-lib-form{margin-top:20px}
.cf-lib-label{display:block;margin:0 0 8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-lib-input{display:block;width:100%;height:56px;margin:0;padding:0 16px;font-family:var(--font-body);font-size:1.0625rem;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));outline:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-lib-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-lib-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink) 38%,transparent)}
.cf-lib-input:focus{border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-lib-input[aria-invalid=true]{border-color:var(--danger)}
.cf-lib-input[aria-invalid=true]:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-lib-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink) 6%,var(--field))}
.cf-lib-error{margin:8px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
@keyframes cf-lib-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-lib-spin{to{transform:rotate(360deg)}}
@media (min-width:900px) and (min-height:820px){.cf-lib-profile{position:sticky;top:32px}}
@media (max-width:899px){
.cf-lib-inner{grid-template-columns:minmax(0,1fr);max-width:38rem;gap:40px}
.cf-lib-profile{align-items:center;text-align:center}
.cf-lib-portrait{width:112px;height:112px;max-height:none;border-radius:999px;outline:3px solid var(--lib-fill);outline-offset:4px}
.cf-lib-id{margin-top:20px}
.cf-lib-handle{display:block;margin:2px 0 0}
.cf-lib-lead{margin-inline:auto}
.cf-lib-socials{justify-content:center}
}
@media (max-width:560px){
.cf-link-in-bio{--lib-rail:32px;--lib-disc:32px;--lib-track:6px;--lib-mile-top:5px}
.cf-lib-row{column-gap:8px}
.cf-lib-disc svg{width:16px;height:16px}
.cf-lib-row--link{--lib-disc-top:16px}
.cf-lib-row--feature,.cf-lib-row--capture{--lib-disc-top:20px}
.cf-lib-link{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:12px;min-height:0;padding:16px}
.cf-lib-link-text{width:100%}
.cf-lib-feature,.cf-lib-capture{padding:20px 16px}
.cf-lib-product{grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:start}
.cf-lib-product img{width:64px;height:64px}
.cf-lib-reasons{padding:12px 14px}
.cf-lib-reasons li{gap:8px}
.cf-lib-btn{padding-inline:12px}
}
@media (prefers-reduced-motion:reduce){
.cf-lib-profile,.cf-lib-row,.cf-lib-spin{animation:none}
.cf-lib-fill,.cf-lib-disc,.cf-lib-link,.cf-lib-btn,.cf-lib-social,.cf-lib-input,.cf-lib-tag{transition:none}
.cf-lib-row.is-current .cf-lib-disc{transform:none}
.cf-lib-link:hover,.cf-lib-social:hover{transform:none}
}
`
pieces/content/link-in-bio/specimen.tsx 88 lines
import __studioImage78d72de1 from "../assets/ff23f658be69e2ff.webp";
import __studioImage6a5e4034 from "../assets/9ca152082db395d2.webp";
import { LinkInBio } from "../link-in-bio"
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]
const sample = defaults.sample
const reg = sample.registration
export default function LinkInBioSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<LinkInBio
state={state}
name="Maya Brooks"
handle="@mayabuilds"
role="Funnel coach · Host of The First Funnel Podcast"
headline={
<>
Build your <mark>first funnel</mark> with a clear plan
</>
}
lead={sample.lead}
presenterImage={slot(
"presenter",
__studioImage78d72de1,
)}
presenterAlt="Maya Brooks smiling at her desk"
links={[
{
kind: "lead",
title: reg.name,
detail: `${reg.headline}, free and on demand.`,
tag: "Free",
href: "#workshop",
},
{
kind: "offer",
primary: true,
flag: "My top pick",
question: "Ready to map your first funnel?",
title: sample.name,
detail: sample.items.map((item) => item.name).join(" · "),
image: slot(
"product",
__studioImage6a5e4034,
),
imageAlt: `${sample.name}: guide, workbook and checklist`,
price: sample.price,
priceLine: "today. That's it.",
priceNote: sample.note,
reasonsTitle: `Three reasons it's ${sample.price} today`,
reasons: [
"Three tools in one kit: guide, workbook and checklist",
"Plan, write and check every page before you launch",
`A ${sample.guarantee} covers it`,
],
label: "I'm ready, show me how",
sublabel: sample.sublabel,
href: "#checkout",
},
{
kind: "podcast",
title: "The First Funnel Podcast",
detail: "Short episodes on offers, pages and launch day.",
tag: "Listen",
href: "#podcast",
},
{
kind: "video",
title: "Latest video: plan your funnel on one page",
detail: "Watch the walkthrough on YouTube.",
tag: "Watch",
href: "#video",
},
]}
socials={[
{ network: "instagram", href: "#instagram", label: "Maya on Instagram" },
{ network: "youtube", href: "#youtube", label: "Maya on YouTube" },
{ network: "linkedin", href: "#linkedin", label: "Maya on LinkedIn" },
{ network: "facebook", href: "#facebook", label: "Maya on Facebook" },
]}
copy={{ privacy: reg.privacy }}
/>
)
}
| Name | Type | Details |
|---|---|---|
name OptionalLinkInBio |
string |
|
handle OptionalLinkInBio |
string |
|
role OptionalLinkInBio |
string |
|
headline OptionalLinkInBio |
React.ReactNode |
|
lead OptionalLinkInBio |
React.ReactNode |
|
presenterImage OptionalLinkInBio |
string |
|
presenterAlt OptionalLinkInBio |
string |
|
links OptionalLinkInBio |
LinkInBioLink[] |
|
socials OptionalLinkInBio |
LinkInBioSocial[] |
|
start OptionalLinkInBio |
LinkInBioMilestone |
|
finish OptionalLinkInBio |
LinkInBioMilestone |
|
showEmailCapture OptionalLinkInBio |
boolean |
|
emailTitle OptionalLinkInBio |
React.ReactNode |
|
emailLead OptionalLinkInBio |
React.ReactNode |
|
copy OptionalLinkInBio |
Partial<LinkInBioCopy> |
|
headingLevel OptionalLinkInBio |
1 | 2 |
|
loading OptionalLinkInBio |
boolean |
|
onAction OptionalLinkInBio |
(link: LinkInBioLink, index: number) => void |
|
onSubmit OptionalLinkInBio |
(values: { email: string }) => void |
|
state OptionalLinkInBio |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalLinkInBio |
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-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter- A photo of the host, coach or founder.
product- The main product shot or cover (ebook, kit, bottle).
-
9ca152082db395d2.webp
image/webp · 164 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
ff23f658be69e2ff.webp
image/webp · 138 KB