Link In Bio 2
Link-in-bio poster: a full-bleed portrait, the creator's name and one-line promise, one big action-colour link to the
Use it in a prompt
Use content/link-in-bio-2 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-2.tsx. - Import it and pass your copy and images (Props tab):
import { LinkInBio2 } from "@/components/funneldna/content/link-in-bio-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/link-in-bio-2/component.tsx 975 lines
// layout: classic-centred-stack
// Link-in-bio poster: a full-bleed portrait, the creator's name and one-line promise, one big action-colour link to the
// free plan, quieter pressable links under it, and an inline email capture to close. Phone first; 480px poster on desktop.
// Theme: every colour, face, radius and shadow reads the theme-contract tokens. Social glyphs are monochrome currentColor
// icons (not official marks); the desktop backdrop is the shared fx kit Backdrop, which reads the scene slot.
import * as React from "react"
import { AlertCircle, CalendarCheck, Dumbbell, Globe, Link2, Loader2, Lock, Mail, Mic, Play, ShoppingBag, Users } from "lucide-react"
import type { LucideIcon } from "lucide-react"
import { Backdrop, FX_HOST } from "../fx/fx"
import gym from "../fx/backdrops/gym"
export type LinkInBio2Kind = "plan" | "program" | "video" | "podcast" | "call" | "community" | "shop" | "link"
export type LinkInBio2Network = "instagram" | "youtube" | "facebook" | "podcast" | "email" | "website"
export type LinkInBio2Link = {
title: React.ReactNode
/** One short line under the title. */
detail?: React.ReactNode
href?: string
/** Picks the icon on a secondary link. */
kind?: LinkInBio2Kind
/** The one next step: largest, in the action colour. The first primary link wins; with none, the first link. */
primary?: boolean
/** Primary link only: small cover thumbnail (slot item-1, transparent cut-out works best). */
image?: string
imageAlt?: string
/** Optional chip, e.g. "New". */
badge?: string
/** Secondary link only: price set with a superscript currency sign, e.g. "$47". */
price?: string
/** Small line under the price, e.g. "one-time payment". */
priceNote?: string
}
export type LinkInBio2Social = {
network: LinkInBio2Network
href: string
/** Accessible name, e.g. "Dana on Instagram". */
label: string
}
export type LinkInBio2Point = { lead: React.ReactNode; text: React.ReactNode }
export type LinkInBio2Copy = {
/** Template: {name} is replaced with the creator's name. */
linksLabel: string
/** Template: {name} is replaced with the creator's name. */
socialsLabel: string
/** Template: {name} is replaced with the creator's name. */
portraitAlt: string
emailLabel: string
emailPlaceholder: string
emailRequired: string
emailInvalid: string
/** Field value shown when the error state is previewed. */
errorSample: string
/** Field value shown when the disabled (still typing) state is previewed. */
typingSample: string
submitLabel: string
submittingLabel: string
privacy: string
}
export type LinkInBio2Props = {
name?: string
/** Social handle shown with the role, e.g. "@coachdanareyes". */
handle?: string
role?: string
/** The one-line promise. Wrap the key phrase in <mark> for the marker stroke. */
promise?: React.ReactNode
/** Slot: presenter. A portrait photo, cropped to fill the top of the poster. */
presenterImage?: string
presenterAlt?: string
/** 4 to 6 links, ordered by importance. */
links?: LinkInBio2Link[]
socials?: LinkInBio2Social[]
showEmailCapture?: boolean
emailTitle?: React.ReactNode
/** Short paragraphs, each opening with a bold lead-in. */
emailPoints?: LinkInBio2Point[]
copy?: Partial<LinkInBio2Copy>
/** Desktop backdrop photo behind the poster (fx kit; a page's scene image replaces it). */
backdropImage?: string
/** 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: LinkInBio2Link, index: number) => void
onSubmit?: (values: { email: string }) => void
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
const KIND_ICON: Record<LinkInBio2Kind, LucideIcon> = {
plan: Dumbbell,
program: Dumbbell,
video: Play,
podcast: Mic,
call: CalendarCheck,
community: Users,
shop: ShoppingBag,
link: Link2,
}
const DEFAULT_COPY: LinkInBio2Copy = {
linksLabel: "Links from {name}",
socialsLabel: "Follow {name}",
portraitAlt: "Portrait of {name}",
emailLabel: "Email address",
emailPlaceholder: "you@example.com",
emailRequired: "Enter your email so Sunday's workout has somewhere to go.",
emailInvalid: "That email looks incomplete. Check it and try again.",
errorSample: "you@example",
typingSample: "you@exa",
submitLabel: "Send me Sunday's workout",
submittingLabel: "Sending",
privacy: "One email a week. Unsubscribe anytime.",
}
const DEFAULT_PROMISE = (
<>
Get strong at home in <mark>20 minutes a day</mark>. No gym needed.
</>
)
const DEFAULT_LINKS: LinkInBio2Link[] = [
{
kind: "plan",
primary: true,
// U+2060 word joiner keeps "20-minute" together when the title wraps.
title: "Get my free 20-\u2060minute plan",
detail: "Three home workouts a week · Free PDF",
href: "#free-plan",
},
{
kind: "program",
title: "Try Strong at Home for 30 days",
detail: "12 coached weeks. Money back if it isn't for you.",
price: "$47",
priceNote: "one-time payment",
href: "#program",
},
{ kind: "video", title: "Watch my 10-minute warm-up", detail: "Do it before every session.", badge: "New", href: "#video" },
{ kind: "podcast", title: "Listen to Strong Parents", detail: "A new episode every Tuesday.", href: "#podcast" },
{ kind: "call", title: "Book a 1:1 coaching call", detail: "Pick a time that suits your week.", href: "#call" },
]
const DEFAULT_SOCIALS: LinkInBio2Social[] = [
{ network: "instagram", href: "#instagram", label: "Dana on Instagram" },
{ network: "youtube", href: "#youtube", label: "Dana on YouTube" },
{ network: "facebook", href: "#facebook", label: "Dana on Facebook" },
{ network: "email", href: "#email", label: "Email Dana" },
]
const DEFAULT_POINTS: LinkInBio2Point[] = [
{ lead: "One email, every Sunday.", text: "A new 20-minute workout planned for your week." },
{ lead: "A mat and two dumbbells.", text: "Every session fits your living room floor." },
]
const EMAIL_PATTERN = /^[^@ ]+@[^@ ]+[.][^@ ]+$/
export function LinkInBio2(props: LinkInBio2Props) {
const {
name = "Dana Reyes",
handle = "@coachdanareyes",
role = "Strength coach for busy parents",
promise = DEFAULT_PROMISE,
presenterImage,
presenterAlt,
links = DEFAULT_LINKS,
socials = DEFAULT_SOCIALS,
showEmailCapture = true,
emailTitle = "Get a fresh workout every Sunday",
emailPoints = DEFAULT_POINTS,
copy: copyProp,
backdropImage = gym,
headingLevel = 1,
loading = false,
onAction,
onSubmit,
state = "default",
className,
} = props
const copy: LinkInBio2Copy = { ...DEFAULT_COPY, ...copyProp }
const fill = (text: string) => text.split("{name}").join(name)
const uid = React.useId().replace(/:/g, "")
const fieldId = `cf-lb2-email-${uid}`
const errorId = `cf-lb2-error-${uid}`
const privacyId = `cf-lb2-privacy-${uid}`
const preset = React.useMemo(
() => presetFor(state, copy.errorSample, copy.typingSample),
[state, copy.errorSample, copy.typingSample],
)
const [email, setEmail] = React.useState(preset.value)
const [touched, setTouched] = React.useState(preset.touched)
React.useEffect(() => {
setEmail(preset.value)
setTouched(preset.touched)
}, [preset])
const trimmed = email.trim()
const valid = EMAIL_PATTERN.test(trimmed)
const showError = touched && !valid
const errorMessage = trimmed ? copy.emailInvalid : copy.emailRequired
// The action stays live and loud; validation runs on submit. Only the previewed disabled state and loading lock it.
const submitDisabled = state === "disabled" || loading
const found = links.findIndex((link) => link.primary)
const primaryIndex = links.length ? (found === -1 ? 0 : found) : -1
const primary = primaryIndex >= 0 ? links[primaryIndex] : undefined
const rest = links.map((link, index) => ({ link, index })).filter(({ index }) => index !== primaryIndex)
const Heading = (headingLevel === 1 ? "h1" : "h2") as "h1" | "h2"
const SubHeading = (headingLevel === 1 ? "h2" : "h3") as "h2" | "h3"
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault()
if (!valid) {
setTouched(true)
return
}
if (loading) return
onSubmit?.({ email: trimmed })
}
const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
if (event.key === "Enter" && !valid) {
event.preventDefault()
setTouched(true)
}
}
return (
<section className={["cf-lb2", className].filter(Boolean).join(" ")} data-state={state} style={FX_HOST}>
<style>{CSS}</style>
<div className="cf-lb2-backdrop" aria-hidden="true">
<Backdrop src={backdropImage} />
</div>
<article className={presenterImage ? "cf-lb2-poster" : "cf-lb2-poster is-bare"}>
{presenterImage ? (
<figure className="cf-lb2-portrait">
<img
src={presenterImage}
alt={presenterAlt ?? fill(copy.portraitAlt)}
width={960}
height={1200}
loading="eager"
decoding="async"
/>
</figure>
) : null}
<div className="cf-lb2-body">
<Heading className="cf-lb2-name">{name}</Heading>
{handle || role ? <p className="cf-lb2-role">{[handle, role].filter(Boolean).join(" · ")}</p> : null}
{promise ? <p className="cf-lb2-promise">{promise}</p> : null}
{socials.length ? (
<ul className="cf-lb2-socials" aria-label={fill(copy.socialsLabel)}>
{socials.map((social) => (
<li key={`${social.network}-${social.href}`}>
<a href={social.href} aria-label={social.label}>
<SocialGlyph network={social.network} />
</a>
</li>
))}
</ul>
) : null}
{primary ? (
<nav aria-label={fill(copy.linksLabel)}>
<ul className="cf-lb2-links" data-pop={primary.image ? "true" : undefined}>
<li className="cf-lb2-item" style={{ "--i": 0 } as React.CSSProperties}>
<Tile
href={primary.href}
className={primary.image ? "cf-lb2-primary" : "cf-lb2-primary no-thumb"}
onClick={() => onAction?.(primary, primaryIndex)}
>
{primary.image ? (
<span className="cf-lb2-thumb">
<img src={primary.image} alt={primary.imageAlt ?? ""} width={176} height={232} loading="eager" />
</span>
) : null}
<span className="cf-lb2-ptext">
<span className="cf-lb2-ptitle">{primary.title}</span>
{primary.detail ? <span className="cf-lb2-pdetail">{primary.detail}</span> : null}
</span>
{primary.badge ? <span className="cf-lb2-chip cf-lb2-flag">{primary.badge}</span> : null}
</Tile>
</li>
{rest.map(({ link, index }, order) => {
const Icon = KIND_ICON[link.kind ?? "link"]
const price = link.price ? splitPrice(link.price) : null
return (
<li key={index} className="cf-lb2-item" style={{ "--i": order + 1 } as React.CSSProperties}>
<Tile
href={link.href}
className={price ? "cf-lb2-link has-price" : "cf-lb2-link"}
onClick={() => onAction?.(link, index)}
>
<span className="cf-lb2-disc" aria-hidden="true">
<Icon size={20} strokeWidth={2.5} />
</span>
<span className="cf-lb2-ltext">
<span className="cf-lb2-ltitle">
{link.title}
{link.badge ? <span className="cf-lb2-chip">{link.badge}</span> : null}
</span>
{link.detail ? <span className="cf-lb2-ldetail">{link.detail}</span> : null}
</span>
{price ? (
<span className="cf-lb2-price">
<span className="cf-lb2-fig">
{price.currency ? <span className="cf-lb2-cur">{price.currency}</span> : null}
{price.amount}
{price.tail}
</span>
{link.priceNote ? <span className="cf-lb2-pnote">{link.priceNote}</span> : null}
</span>
) : (
<span aria-hidden="true" />
)}
</Tile>
</li>
)
})}
</ul>
</nav>
) : null}
{showEmailCapture ? (
<div className="cf-lb2-capture">
<SubHeading className="cf-lb2-ctitle">{emailTitle}</SubHeading>
{emailPoints.map((point, i) => (
<p key={i} className="cf-lb2-point">
<strong>{point.lead}</strong> {point.text}
</p>
))}
<form className="cf-lb2-form" noValidate onSubmit={handleSubmit}>
<label className="cf-lb2-label" htmlFor={fieldId}>
{copy.emailLabel}
</label>
<input
id={fieldId}
className="cf-lb2-field"
type="email"
name="email"
inputMode="email"
autoComplete="email"
placeholder={copy.emailPlaceholder}
value={email}
onChange={(event) => setEmail(event.target.value)}
onBlur={() => {
if (email.trim()) setTouched(true)
}}
onKeyDown={handleKeyDown}
aria-invalid={showError ? true : undefined}
aria-describedby={[showError ? errorId : "", privacyId].filter(Boolean).join(" ")}
/>
{showError ? (
<p id={errorId} className="cf-lb2-error" role="alert">
<AlertCircle size={16} strokeWidth={2.5} aria-hidden="true" />
{errorMessage}
</p>
) : null}
<button className="cf-lb2-submit" type="submit" disabled={submitDisabled} aria-busy={loading ? true : undefined}>
{loading ? (
<>
<Loader2 className="cf-lb2-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
{copy.submittingLabel}
</>
) : (
copy.submitLabel
)}
</button>
<p id={privacyId} className="cf-lb2-privacy">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.privacy}
</p>
</form>
</div>
) : null}
</div>
</article>
</section>
)
}
export default LinkInBio2
function Tile({
href,
className,
onClick,
children,
}: {
href?: string
className: string
onClick: () => void
children: React.ReactNode
}) {
if (href) {
return (
<a className={className} href={href} onClick={onClick} style={TILE_STYLE}>
{children}
</a>
)
}
return (
<button type="button" className={className} onClick={onClick} style={TILE_STYLE}>
{children}
</button>
)
}
/** Both link tiles take the button role's radius and face, so a theme restyles them like its buttons. */
const TILE_STYLE: React.CSSProperties = {
borderRadius: "var(--button-radius, var(--radius, 12px))",
fontFamily: "var(--button-font, var(--font-display))",
}
function SocialGlyph({ network }: { network: LinkInBio2Network }) {
const svg = {
width: 24,
height: 24,
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: 2.5,
strokeLinecap: "round" as const,
strokeLinejoin: "round" as const,
"aria-hidden": true,
}
switch (network) {
case "instagram":
return (
<svg {...svg}>
<rect x="2" y="2" width="20" height="20" rx="5" />
<path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" />
<path d="M17.5 6.5h.01" />
</svg>
)
case "youtube":
return (
<svg {...svg}>
<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 "facebook":
return (
<svg {...svg}>
<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={24} strokeWidth={2.5} aria-hidden="true" />
case "email":
return <Mail size={24} strokeWidth={2.5} aria-hidden="true" />
default:
return <Globe size={24} strokeWidth={2.5} aria-hidden="true" />
}
}
function presetFor(state: LinkInBio2Props["state"], errorSample: string, typingSample: string) {
if (state === "error") return { value: errorSample, touched: true }
if (state === "disabled") return { value: typingSample, touched: false }
return { value: "", touched: false }
}
function splitPrice(price: string) {
const match = price.match(/^([^0-9]*)([0-9][0-9.,]*)(.*)$/)
if (!match) return { currency: "", amount: price, tail: "" }
return { currency: match[1].trim(), amount: match[2], tail: match[3] }
}
const CSS = `
.cf-lb2 {
--lb2-gutter: clamp(16px, 5vw, 28px);
--lb2-sh: var(--shadow, oklch(0.22 0.03 260));
--lb2-b: var(--button-bg, var(--cta));
--lb2-b2: var(--button-bg-2, var(--cta-2));
--lb2-on-b: var(--button-ink, var(--cta-ink));
--lb2-s: var(--button-2-bg, var(--secondary));
--lb2-on-s: var(--button-2-ink, var(--secondary-ink));
--lb2-focus: var(--field-focus, var(--accent));
--lb2-marker: var(--marker, #fae37c);
position: relative;
isolation: isolate;
overflow: hidden;
background: var(--band);
color: var(--ink);
font-family: var(--font-body);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
}
.cf-lb2 *, .cf-lb2 *::before, .cf-lb2 *::after { box-sizing: border-box; }
.cf-lb2-backdrop { position: absolute; inset: 0; z-index: 0; }
.cf-lb2-poster {
position: relative;
z-index: 1;
width: 100%;
max-width: 480px;
margin: 0 auto;
background: var(--card);
border: 1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--lb2-sh) l c h / 0.22), 0 12px 24px -8px oklch(from var(--lb2-sh) l c h / 0.32)));
overflow: hidden;
}
.cf-lb2-portrait { position: relative; margin: 0; aspect-ratio: 4 / 5; }
.cf-lb2-portrait img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: 50% 20%;
-webkit-mask-image: linear-gradient(to bottom, var(--ink) 70%, transparent);
mask-image: linear-gradient(to bottom, var(--ink) 70%, transparent);
}
.cf-lb2-body {
position: relative;
margin-top: -16px;
padding: 0 var(--lb2-gutter) clamp(28px, 6vw, 36px);
text-align: center;
}
.cf-lb2-poster.is-bare .cf-lb2-body { margin-top: 0; padding-top: clamp(32px, 6vw, 40px); }
.cf-lb2-name {
margin: 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: 2.5rem;
line-height: 1.04;
color: var(--ink);
text-wrap: balance;
}
.cf-lb2-role {
margin: 12px 0 0;
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
color: var(--muted);
text-wrap: pretty;
}
.cf-lb2-promise {
margin: 12px 0 0;
font-size: 1.25rem;
line-height: 1.4;
font-weight: 500;
color: var(--ink);
text-wrap: pretty;
}
.cf-lb2-promise mark {
color: inherit;
font-weight: 700;
padding: 0 0.14em;
border-radius: 0.2em 0.4em 0.25em 0.35em;
background: linear-gradient(transparent 36%, color-mix(in oklch, var(--lb2-marker) 80%, transparent) 36%, color-mix(in oklch, var(--lb2-marker) 80%, transparent) 94%, transparent 94%);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-lb2-socials {
list-style: none;
margin: 16px 0 0;
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 4px;
}
.cf-lb2-socials a {
display: grid;
place-items: center;
width: 44px;
height: 44px;
border-radius: 999px;
color: var(--ink);
-webkit-tap-highlight-color: transparent;
transition: background 0.16s ease, transform 0.16s ease;
}
.cf-lb2-socials a:active { transform: scale(0.92); background: color-mix(in oklch, var(--ink) 10%, var(--card)); }
.cf-lb2-links {
list-style: none;
margin: 28px 0 0;
padding: 0;
display: grid;
gap: 12px;
text-align: left;
}
.cf-lb2-links[data-pop='true'] { margin-top: 44px; }
.cf-lb2-item {
animation: cf-lb2-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
animation-delay: min(calc(var(--i, 0) * 0.07s), 0.28s);
}
.cf-lb2-item:first-child { margin-bottom: 4px; }
.cf-lb2-primary, .cf-lb2-submit {
background: linear-gradient(oklch(from var(--button-bg, var(--cta)) calc(l + 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.02) c h));
color: var(--button-ink, var(--cta-ink));
text-shadow: var(--button-text-shadow, none);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--lb2-b) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--lb2-b) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.3), 0 8px 16px -6px oklch(from var(--lb2-sh) l c h / 0.45));
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-lb2-primary {
position: relative;
display: flex;
align-items: center;
width: 100%;
min-height: 104px;
padding: 18px 22px 18px 120px;
font: inherit;
text-align: left;
text-decoration: none;
}
.cf-lb2-primary.no-thumb { padding-left: 22px; }
.cf-lb2-thumb {
position: absolute;
left: 16px;
bottom: 10px;
width: 88px;
height: 116px;
pointer-events: none;
}
.cf-lb2-thumb img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
object-position: 50% 100%;
filter: drop-shadow(0 2px 3px oklch(from var(--lb2-sh) l c h / 0.4)) drop-shadow(0 10px 12px oklch(from var(--lb2-sh) l c h / 0.3));
transition: transform 0.16s ease;
}
.cf-lb2-ptext { display: block; min-width: 0; }
.cf-lb2-ptitle {
display: block;
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.4vw, 1.25rem);
line-height: 1.15;
text-wrap: balance;
}
.cf-lb2-pdetail {
display: block;
margin-top: 6px;
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
text-wrap: pretty;
}
.cf-lb2[data-state='hover'] .cf-lb2-primary {
transform: translateY(-1px);
background: linear-gradient(oklch(from var(--lb2-b) calc(l - 0.01) c h), oklch(from var(--lb2-b2) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--lb2-b) calc(l + 0.1) c h / 0.7), inset 0 -3px 0 oklch(from var(--lb2-b) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.32), 0 12px 20px -8px oklch(from var(--lb2-sh) l c h / 0.55);
}
.cf-lb2[data-state='hover'] .cf-lb2-primary .cf-lb2-thumb img { transform: translateY(-3px); }
.cf-lb2-primary:active, .cf-lb2[data-state='active'] .cf-lb2-primary {
transform: translateY(2px) scale(0.99);
background: linear-gradient(oklch(from var(--lb2-b) calc(l - 0.03) c h), oklch(from var(--lb2-b2) calc(l - 0.08) c h));
box-shadow: inset 0 2px 6px oklch(from var(--lb2-b) calc(l - 0.25) c h / 0.6), inset 0 -2px 0 oklch(from var(--lb2-b) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--lb2-sh) l c h / 0.3);
}
.cf-lb2-primary:active .cf-lb2-thumb img, .cf-lb2[data-state='active'] .cf-lb2-primary .cf-lb2-thumb img { transform: translateY(1px); }
.cf-lb2-chip {
display: inline-block;
padding: 5px 12px;
border-radius: 999px;
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
font-family: var(--font-body);
font-size: 0.875rem;
font-weight: 800;
line-height: 1.2;
letter-spacing: 0.02em;
white-space: nowrap;
text-shadow: none;
animation: cf-lb2-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.32s both;
}
.cf-lb2-flag {
position: absolute;
top: -14px;
right: 16px;
box-shadow: var(--shadow-sm, 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.25));
}
.cf-lb2-ltitle .cf-lb2-chip { margin-inline-start: 8px; vertical-align: 0.1em; }
.cf-lb2-link {
display: grid;
grid-template-columns: 40px minmax(0, 1fr) auto;
align-items: center;
column-gap: 16px;
width: 100%;
min-height: 72px;
padding: 12px 16px 12px 12px;
font: inherit;
text-align: left;
text-decoration: none;
color: var(--lb2-on-s);
background: var(--lb2-s);
border: 1px solid var(--button-2-border, transparent);
border-radius: var(--button-radius, var(--radius, 12px));
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.25)));
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-lb2-disc {
display: grid;
place-items: center;
width: 40px;
height: 40px;
border-radius: 999px;
background: var(--card);
color: var(--accent);
box-shadow: inset 0 0 0 1px oklch(from var(--ink) l c h / 0.08);
transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.cf-lb2-ltext { display: block; min-width: 0; }
.cf-lb2-ltitle {
display: block;
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: 1.125rem;
line-height: 1.2;
text-wrap: pretty;
}
.cf-lb2-ldetail {
display: block;
margin-top: 4px;
font-size: 0.9375rem;
font-weight: 500;
line-height: 1.4;
color: color-mix(in oklch, var(--lb2-on-s) 80%, var(--lb2-s));
text-wrap: pretty;
}
.cf-lb2-price {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 12px;
text-align: right;
}
.cf-lb2-fig {
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: 2.5rem;
line-height: 1;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.cf-lb2-cur {
position: relative;
top: 0.12em;
margin-right: 0.04em;
font-size: 0.45em;
letter-spacing: 0;
vertical-align: top;
}
.cf-lb2-pnote {
max-width: 5.5rem;
font-size: 0.875rem;
font-weight: 700;
line-height: 1.2;
color: color-mix(in oklch, var(--lb2-on-s) 80%, var(--lb2-s));
text-wrap: balance;
}
.cf-lb2-link:active {
transform: translateY(2px) scale(0.99);
background: oklch(from var(--lb2-s) calc(l - 0.05) c h);
box-shadow: inset 0 2px 5px oklch(from var(--lb2-sh) l c h / 0.22);
}
.cf-lb2-link:active .cf-lb2-disc {
transform: scale(0.92);
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
}
.cf-lb2-primary:focus-visible, .cf-lb2-link:focus-visible, .cf-lb2-socials a:focus-visible, .cf-lb2-submit:focus-visible {
outline: 3px solid var(--lb2-focus);
outline-offset: 3px;
}
.cf-lb2-capture {
margin-top: 32px;
padding: clamp(20px, 3vw, 24px);
border-radius: 10px;
background: color-mix(in oklch, var(--ink) 4%, var(--card));
text-align: left;
}
.cf-lb2-ctitle {
margin: 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
color: var(--ink);
text-wrap: balance;
}
.cf-lb2-point {
margin: 8px 0 0;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--ink);
text-wrap: pretty;
}
.cf-lb2-ctitle + .cf-lb2-point { margin-top: 12px; }
.cf-lb2-point strong { font-weight: 800; }
.cf-lb2-form { margin-top: 20px; }
.cf-lb2-label {
display: block;
margin-bottom: 8px;
font-size: 1rem;
font-weight: 700;
line-height: 1.3;
color: var(--label-ink, var(--ink));
}
.cf-lb2-field {
display: block;
width: 100%;
height: 56px;
padding: 0 16px;
font: inherit;
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));
box-shadow: inset 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.08);
outline: none;
transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cf-lb2-field::placeholder { color: color-mix(in oklch, var(--field-ink) 65%, var(--field)); opacity: 1; }
.cf-lb2-field:focus { border-color: var(--lb2-focus); box-shadow: 0 0 0 3px oklch(from var(--lb2-focus) l c h / 0.35); }
.cf-lb2-field[aria-invalid='true'] { border-color: var(--danger); }
.cf-lb2-field[aria-invalid='true']:focus { box-shadow: 0 0 0 3px oklch(from var(--danger) l c h / 0.25); }
.cf-lb2-error {
margin: 8px 0 0;
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
color: var(--danger);
text-wrap: pretty;
}
.cf-lb2-error svg, .cf-lb2-privacy svg {
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: 0.4em;
}
.cf-lb2-submit {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
width: 100%;
min-height: 56px;
margin-top: 12px;
padding: 0 24px;
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;
}
.cf-lb2-submit:not(:disabled):active {
transform: translateY(2px);
box-shadow: inset 0 2px 6px oklch(from var(--lb2-b) calc(l - 0.25) c h / 0.6), inset 0 -2px 0 oklch(from var(--lb2-b) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--lb2-sh) l c h / 0.3);
}
.cf-lb2-submit:disabled:not([aria-busy='true']) {
background: var(--button-2-bg, var(--secondary));
color: color-mix(in oklch, var(--button-2-ink, var(--secondary-ink)) 80%, transparent);
border: 1px solid var(--button-2-border, transparent);
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.25)));
text-shadow: none;
cursor: not-allowed;
}
.cf-lb2-submit[aria-busy='true'] { cursor: progress; }
.cf-lb2-spin { animation: cf-lb2-spin 0.8s linear infinite; }
.cf-lb2-privacy {
margin: 12px 0 0;
text-align: center;
font-size: 0.9375rem;
font-weight: 500;
line-height: 1.4;
color: var(--muted);
text-wrap: pretty;
}
@media (hover: hover) {
.cf-lb2-primary:hover {
transform: translateY(-1px);
background: linear-gradient(oklch(from var(--lb2-b) calc(l - 0.01) c h), oklch(from var(--lb2-b2) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--lb2-b) calc(l + 0.1) c h / 0.7), inset 0 -3px 0 oklch(from var(--lb2-b) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.32), 0 12px 20px -8px oklch(from var(--lb2-sh) l c h / 0.55);
}
.cf-lb2-primary:hover .cf-lb2-thumb img { transform: translateY(-3px); }
.cf-lb2-link:hover {
transform: translateY(-1px);
background: oklch(from var(--lb2-s) calc(l - 0.03) c h);
box-shadow: var(--shadow-md, 0 1px 2px oklch(from var(--lb2-sh) l c h / 0.22), 0 4px 10px -2px oklch(from var(--lb2-sh) l c h / 0.2));
}
.cf-lb2-socials a:hover { background: color-mix(in oklch, var(--ink) 7%, var(--card)); }
.cf-lb2-submit:not(:disabled):hover {
background: linear-gradient(oklch(from var(--lb2-b) calc(l - 0.01) c h), oklch(from var(--lb2-b2) calc(l - 0.07) c h));
}
.cf-lb2-primary:active, .cf-lb2-link:active, .cf-lb2-submit:not(:disabled):active { filter: none; }
}
.cf-lb2-primary:active {
transform: translateY(2px) scale(0.99);
background: linear-gradient(oklch(from var(--lb2-b) calc(l - 0.03) c h), oklch(from var(--lb2-b2) calc(l - 0.08) c h));
}
.cf-lb2-link:active { transform: translateY(2px) scale(0.99); background: oklch(from var(--lb2-s) calc(l - 0.05) c h); }
@media (max-width: 560px) {
.cf-lb2 { padding: 0; background: var(--card); }
.cf-lb2-backdrop { display: none; }
.cf-lb2-poster { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
.cf-lb2-primary { min-height: 96px; padding: 16px 18px 16px 104px; }
.cf-lb2-primary.no-thumb { padding-left: 20px; }
.cf-lb2-thumb { left: 14px; bottom: 10px; width: 76px; height: 100px; }
.cf-lb2-links[data-pop='true'] { margin-top: 36px; }
.cf-lb2-link { column-gap: 12px; padding: 12px 14px 12px 12px; }
.cf-lb2-body:has(> .cf-lb2-capture:last-child) { padding-bottom: 0; }
.cf-lb2-capture {
margin: 32px calc(-1 * var(--lb2-gutter)) 0;
padding: 28px var(--lb2-gutter) 36px;
border-radius: 0;
}
.cf-lb2-submit { padding: 0 16px; }
}
@media (max-width: 440px) {
.cf-lb2-link.has-price { grid-template-columns: 40px minmax(0, 1fr); }
.cf-lb2-link.has-price .cf-lb2-disc { grid-row: span 2; align-self: center; }
.cf-lb2-link.has-price .cf-lb2-price {
grid-column: 2;
flex-direction: row;
align-items: baseline;
justify-content: flex-start;
gap: 8px;
margin-top: 8px;
text-align: left;
}
.cf-lb2-link.has-price .cf-lb2-fig { font-size: 2rem; }
.cf-lb2-link.has-price .cf-lb2-pnote { max-width: none; }
}
@keyframes cf-lb2-rise { from { opacity: 0.82; transform: translateY(8px); } }
@keyframes cf-lb2-pop { from { transform: scale(0.9); } }
@keyframes cf-lb2-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.cf-lb2 .cf-lb2-item, .cf-lb2 .cf-lb2-chip, .cf-lb2 .cf-lb2-spin { animation: none; }
.cf-lb2 .cf-lb2-primary, .cf-lb2 .cf-lb2-link, .cf-lb2 .cf-lb2-submit, .cf-lb2 .cf-lb2-socials a,
.cf-lb2 .cf-lb2-thumb img, .cf-lb2 .cf-lb2-disc, .cf-lb2 .cf-lb2-field { transition: none; }
}
`
pieces/content/link-in-bio-2/specimen.tsx 68 lines
import __studioImageffffa1f1 from "../assets/619abc0ca2313688.webp";
import __studioImagec1b565fb from "../assets/69c258cc4a7970db.webp";
import * as React from "react"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { LinkInBio2 } from "../link-in-bio-2"
import type { LinkInBio2Link, LinkInBio2Social } from "../link-in-bio-2"
export const states = ["default", "hover", "active", "disabled", "error"] as const
type SpecimenState = (typeof states)[number]
export default function LinkInBio2Specimen({ state = "default" }: { state?: SpecimenState }) {
const sample = defaults.sample
const links: LinkInBio2Link[] = [
{
kind: "plan",
primary: true,
title: "Get my free 20-\u2060minute plan",
detail: "Three home workouts a week · Free PDF",
image: slot(
"item-1",
__studioImageffffa1f1,
),
imageAlt: "",
href: "#free-plan",
},
{
kind: "program",
title: "Try Strong at Home for 30 days",
detail: `12 coached weeks · ${sample.guarantee}`,
price: sample.price,
priceNote: "one-time payment",
href: "#program",
},
{ kind: "video", title: "Watch my 10-minute warm-up", detail: "Do it before every session.", badge: "New", href: "#video" },
{ kind: "podcast", title: "Listen to Strong Parents", detail: "A new episode every Tuesday.", href: "#podcast" },
{ kind: "call", title: "Book a 1:1 coaching call", detail: "Pick a time that suits your week.", href: "#call" },
]
const socials: LinkInBio2Social[] = [
{ network: "instagram", href: "#instagram", label: "Dana on Instagram" },
{ network: "youtube", href: "#youtube", label: "Dana on YouTube" },
{ network: "facebook", href: "#facebook", label: "Dana on Facebook" },
{ network: "email", href: "#email", label: "Email Dana" },
]
return (
<LinkInBio2
state={state}
name="Dana Reyes"
handle="@coachdanareyes"
role="Strength coach for busy parents"
promise={
<>
Get strong at home in <mark>20 minutes a day</mark>. No gym needed.
</>
}
presenterImage={slot(
"presenter",
__studioImagec1b565fb,
)}
presenterAlt="Coach Dana Reyes smiling in her home gym"
links={links}
socials={socials}
/>
)
}
| Name | Type | Details |
|---|---|---|
name OptionalLinkInBio2 |
string |
|
handle OptionalLinkInBio2 |
string |
|
role OptionalLinkInBio2 |
string |
|
promise OptionalLinkInBio2 |
React.ReactNode |
|
presenterImage OptionalLinkInBio2 |
string |
|
presenterAlt OptionalLinkInBio2 |
string |
|
links OptionalLinkInBio2 |
LinkInBio2Link[] |
|
socials OptionalLinkInBio2 |
LinkInBio2Social[] |
|
showEmailCapture OptionalLinkInBio2 |
boolean |
|
emailTitle OptionalLinkInBio2 |
React.ReactNode |
|
emailPoints OptionalLinkInBio2 |
LinkInBio2Point[] |
|
copy OptionalLinkInBio2 |
Partial<LinkInBio2Copy> |
|
backdropImage OptionalLinkInBio2 |
string |
|
headingLevel OptionalLinkInBio2 |
1 | 2 |
|
loading OptionalLinkInBio2 |
boolean |
|
onAction OptionalLinkInBio2 |
(link: LinkInBio2Link, index: number) => void |
|
onSubmit OptionalLinkInBio2 |
(values: { email: string }) => void |
|
state OptionalLinkInBio2 |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalLinkInBio2 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
presenter- A photo of the host, coach or founder.
-
619abc0ca2313688.webp
image/webp · 61.1 KB
-
69c258cc4a7970db.webp
image/webp · 82.8 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d6298af761bd1067.webp
image/webp · 41.4 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB