Link In Bio 4
Link-in-bio block for a local shop. A live open-now status is computed from the shop's real hours in its own
Use it in a prompt
Use content/link-in-bio-4 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/link-in-bio-4.tsx. - Import it and pass your copy and images (Props tab):
import { LinkInBio4 } from "@/components/funneldna/content/link-in-bio-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/link-in-bio-4/component.tsx 690 lines
// layout: segmented-stepper
// Link-in-bio block for a local shop. A live open-now status is computed from the shop's real hours in its own
// time zone. Below it sit a segmented week strip, big links led by "order for pickup", and a weekly-specials signup.
// Theme: every colour, face, radius, shadow and image reads the theme-contract tokens and slots (no exceptions).
import * as React from "react"
import { AlertCircle, Clock, Croissant, Link2, Loader2, Lock, MapPin, Phone, ShoppingBag } from "lucide-react"
import type { LucideIcon } from "lucide-react"
import { FX_HOST, Texture } from "../fx/fx"
import linen from "../fx/textures/linen"
/** One day's hours in 24h "HH:MM" (same-day close), or null when closed. */
export type LinkInBio4Hours = { open: string; close: string } | null
export type LinkInBio4Kind = "order" | "menu" | "directions" | "call" | "link"
export type LinkInBio4Link = {
/** Picks the row icon. */
kind?: LinkInBio4Kind
title: React.ReactNode
detail?: React.ReactNode
/** tel:, map or page URL. */
href?: string
/** Short action word on the right ("Call", "Open map"). */
tag?: string
/** Open in a new tab (maps). */
newTab?: boolean
}
export type LinkInBio4Order = {
label: string
/** Button label while the shop is closed. */
closedLabel: string
instruction: React.ReactNode
/** Template: {when} (today / tomorrow / a day name) and {time}. */
closedInstruction: string
note: string
/** Template: {when} and {time}. */
closedNote: string
href?: string
}
export type LinkInBio4Special = { day: string; name: React.ReactNode }
export type LinkInBio4Copy = {
/** Seven names, Sunday first. */
days: string[]
daysShort: string[]
am: string
pm: string
rangeSeparator: string
weekLabel: string
/** Template: {day}. */
todayLabel: string
closedDay: string
checking: string
noHours: string
openNow: string
/** Template: {time}. */
openUntil: string
closingSoon: string
/** Template: {minutes} and {time}. */
closingIn: string
closed: string
/** Templates: {time}, and {day} for opensOn. */
opensToday: string
opensTomorrow: string
opensOn: string
today: string
tomorrow: string
linksLabel: 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 LinkInBio4Props = {
name?: React.ReactNode
tagline?: React.ReactNode
/** Slot: scene. A round-cropped shopfront photo. */
shopImage?: string
shopImageAlt?: string
/** Seven entries, Sunday first. */
hours?: LinkInBio4Hours[]
/** IANA time zone of the shop, e.g. "America/Chicago". */
timeZone?: string
/** Fixed clock for previews and tests. Omit it to use the live device clock. */
now?: Date | string | number
/** Minutes before closing that switch the strip to "Closing soon". */
closingSoonMinutes?: number
/** First day of the week strip: 0 Sunday, 1 Monday. */
weekStart?: 0 | 1
order?: Partial<LinkInBio4Order>
/** Turns the order button off, e.g. while online ordering is paused. */
orderDisabled?: boolean
links?: LinkInBio4Link[]
specialsTitle?: React.ReactNode
specialsLead?: React.ReactNode
specials?: LinkInBio4Special[]
/** Slot: item-1. A photo of this week's bake. */
specialsImage?: string
specialsImageAlt?: string
showEmailCapture?: boolean
copy?: Partial<LinkInBio4Copy>
/** 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
/** Index 0 is the order button; the links follow from 1. */
onAction?: (link: LinkInBio4Link, index: number) => void
onSubmit?: (values: { email: string }) => void
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
const KIND_ICON: Record<LinkInBio4Kind, LucideIcon> = {
order: ShoppingBag,
menu: Croissant,
directions: MapPin,
call: Phone,
link: Link2,
}
const DEFAULT_HOURS: LinkInBio4Hours[] = [
{ open: "08:00", close: "14:00" },
null,
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "15:00" },
]
const DEFAULT_ORDER: LinkInBio4Order = {
label: "Order for pickup",
closedLabel: "Order ahead for pickup",
instruction: "Skip the line. Tap the button below to order for pickup.",
closedInstruction: "We open {when} at {time}. Tap the button below to order ahead.",
note: "Ready to collect in about 15 minutes",
closedNote: "Collect it from {time} {when}",
href: "#order",
}
const DEFAULT_LINKS: LinkInBio4Link[] = [
{ kind: "menu", title: "Today's menu", detail: "Morning buns, sourdough, croissants and coffee", tag: "See menu", href: "#menu" },
{
kind: "directions",
title: "Get directions",
detail: "214 Larch Street",
tag: "Open map",
href: "https://www.google.com/maps/search/?api=1&query=214+Larch+Street",
newTab: true,
},
{ kind: "call", title: "Call the shop", detail: "(555) 014-2290", tag: "Call", href: "tel:+15550142290" },
]
const DEFAULT_SPECIALS: LinkInBio4Special[] = [
{ day: "Fri", name: "Blood orange morning buns" },
{ day: "Sat", name: "Rye and caraway sourdough" },
{ day: "Sun", name: "Brown butter pear galette" },
]
const DEFAULT_COPY: LinkInBio4Copy = {
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
am: "am",
pm: "pm",
rangeSeparator: "–",
weekLabel: "Opening hours by day",
todayLabel: "Today, {day}",
closedDay: "Closed",
checking: "Checking today's hours",
noHours: "Call us for today's hours",
openNow: "Open now",
openUntil: "until {time}",
closingSoon: "Closing soon",
closingIn: "{minutes} min left, open until {time}",
closed: "Closed",
opensToday: "Opens at {time}",
opensTomorrow: "Opens tomorrow at {time}",
opensOn: "Opens {day} at {time}",
today: "today",
tomorrow: "tomorrow",
linksLabel: "Menu, directions and phone",
emailLabel: "Email address",
emailPlaceholder: "you@example.com",
emailRequired: "Enter your email so the specials have somewhere to go.",
emailInvalid: "That email looks incomplete. Check it and try again.",
errorSample: "you@example",
submitLabel: "Send me the specials",
submittingLabel: "Sending",
privacy: "We respect your inbox. Unsubscribe anytime.",
}
const EMAIL_PATTERN = /^[^@ ]+@[^@ ]+[.][^@ ]+$/
const useIsoLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect
const rise = (i: number) => ({ "--i": i }) as React.CSSProperties
export function LinkInBio4(props: LinkInBio4Props) {
const {
name = "Kettle & Crumb",
tagline = "Sourdough, morning buns and good coffee on Larch Street.",
shopImage,
shopImageAlt = "The Kettle & Crumb shopfront in the morning",
hours = DEFAULT_HOURS,
timeZone = "America/Chicago",
now,
closingSoonMinutes = 60,
weekStart = 1,
orderDisabled = false,
links = DEFAULT_LINKS,
specialsTitle = "Get the weekend bake list first",
specialsLead = "One short email every Thursday with what's coming out of the oven. This week:",
specials = DEFAULT_SPECIALS,
specialsImage,
specialsImageAlt = "This week's specials on the bakery counter",
showEmailCapture = true,
headingLevel = 1,
loading = false,
onAction,
onSubmit,
state = "default",
className,
} = props
const c: LinkInBio4Copy = { ...DEFAULT_COPY, ...props.copy }
const order: LinkInBio4Order = { ...DEFAULT_ORDER, ...props.order }
const uid = React.useId()
const Heading = headingLevel === 1 ? "h1" : "h2"
const Sub = headingLevel === 1 ? "h2" : "h3"
// Live clock: a fixed `now` wins; otherwise read the device clock before paint and re-check every 30 seconds.
const fixedRaw = now == null ? null : new Date(now).getTime()
const fixed = fixedRaw != null && Number.isFinite(fixedRaw) ? fixedRaw : null
const [liveNow, setLiveNow] = React.useState<number | null>(null)
useIsoLayoutEffect(() => {
if (fixed != null) return
setLiveNow(Date.now())
const id = window.setInterval(() => setLiveNow(Date.now()), 30000)
return () => window.clearInterval(id)
}, [fixed])
const stamp = fixed ?? liveNow
const clock = stamp == null ? null : zonedClock(new Date(stamp), timeZone)
const status = clock ? getStatus(hours, clock, closingSoonMinutes) : null
const time = (mins: number) => formatClock(mins, c.am, c.pm)
let tone: "open" | "closing" | "closed" | "unknown" = "unknown"
let strong = ""
let rest = c.checking
if (status) {
tone = status.kind
if (status.kind === "open") {
strong = c.openNow
rest = fill(c.openUntil, { time: time(status.closeAt) })
} else if (status.kind === "closing") {
strong = c.closingSoon
rest = fill(c.closingIn, { minutes: status.minutesLeft, time: time(status.closeAt) })
} else if (status.kind === "closed") {
strong = c.closed
const template = status.nextOffset === 0 ? c.opensToday : status.nextOffset === 1 ? c.opensTomorrow : c.opensOn
rest = fill(template, { time: time(status.openAt), day: c.days[status.nextDay] ?? "" })
} else {
rest = c.noHours
}
}
const closedInfo = status && status.kind === "closed" ? status : null
const whenWord = closedInfo
? closedInfo.nextOffset === 0
? c.today
: closedInfo.nextOffset === 1
? c.tomorrow
: c.days[closedInfo.nextDay] ?? ""
: ""
const orderVars: Record<string, string | number> = closedInfo ? { when: whenWord, time: time(closedInfo.openAt) } : {}
const orderLabel = closedInfo ? order.closedLabel : order.label
const orderInstruction: React.ReactNode = closedInfo ? fill(order.closedInstruction, orderVars) : order.instruction
const orderNote = closedInfo ? fill(order.closedNote, orderVars) : order.note
const orderOff = orderDisabled || state === "disabled"
const orderLink: LinkInBio4Link = { kind: "order", title: orderLabel, href: order.href }
const press = (link: LinkInBio4Link, index: number) => () => onAction?.(link, index)
// Week strip: one segment per day, today selected until the visitor picks another.
const today = clock ? clock.day : null
const [picked, setPicked] = React.useState<number | null>(null)
const selected = picked ?? today ?? weekStart
const dayOrder = Array.from({ length: 7 }, (_, i) => (weekStart + i) % 7)
const tabRefs = React.useRef<(HTMLButtonElement | null)[]>([])
const onTabKey = (e: React.KeyboardEvent<HTMLButtonElement>, i: number) => {
const next =
e.key === "ArrowRight" ? (i + 1) % 7 : e.key === "ArrowLeft" ? (i + 6) % 7 : e.key === "Home" ? 0 : e.key === "End" ? 6 : -1
if (next < 0) return
e.preventDefault()
setPicked(dayOrder[next])
tabRefs.current[next]?.focus()
}
const selSpan = daySpan(hours, selected)
const selRange = selSpan ? `${time(selSpan.open)} ${c.rangeSeparator} ${time(selSpan.close)}` : c.closedDay
const selName = c.days[selected] ?? ""
// Email capture: validates inline, then hands the value to the builder.
const formOff = state === "disabled"
const [email, setEmail] = React.useState(state === "error" ? c.errorSample : "")
const [error, setError] = React.useState<string | null>(state === "error" ? c.emailInvalid : null)
React.useEffect(() => {
if (state === "error") {
setEmail(c.errorSample)
setError(c.emailInvalid)
}
}, [state]) // eslint-disable-line react-hooks/exhaustive-deps
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault()
if (formOff || loading) return
const value = email.trim()
if (!value) return setError(c.emailRequired)
if (!EMAIL_PATTERN.test(value)) return setError(c.emailInvalid)
setError(null)
onSubmit?.({ email: value })
}
const orderClass = cx("lb4-order", state === "hover" && "is-hover", state === "active" && "is-active")
const orderEl = orderOff ? (
<button type="button" className={orderClass} disabled>
{orderLabel}
</button>
) : order.href ? (
<a className={orderClass} href={order.href} onClick={press(orderLink, 0)}>
{orderLabel}
</a>
) : (
<button type="button" className={orderClass} onClick={press(orderLink, 0)}>
{orderLabel}
</button>
)
return (
<section className={cx("cf-link-in-bio-4", className)} aria-labelledby={`${uid}-name`}>
<style>{CSS}</style>
<div className="lb4-band" style={FX_HOST}>
<Texture src={linen} tone="band-ink" />
<div className="lb4-col lb4-band-inner">
{shopImage ? <img className="lb4-avatar" src={shopImage} alt={shopImageAlt} width={148} height={148} /> : null}
<Heading id={`${uid}-name`} className="lb4-name">
{name}
</Heading>
{tagline ? <p className="lb4-tagline">{tagline}</p> : null}
<p key={tone} className={cx("lb4-status", `is-${tone}`)}>
<span className="lb4-dot" aria-hidden="true" />
{strong ? <strong>{strong}</strong> : null}
{strong && rest ? (
tone === "open" ? (
" "
) : (
<span className="lb4-sep" aria-hidden="true">
·
</span>
)
) : null}
{rest ? <span>{rest}</span> : null}
</p>
<div className="lb4-week" role="tablist" aria-label={c.weekLabel}>
{dayOrder.map((d, i) => {
const isSel = d === selected
return (
<button
key={d}
ref={(el) => {
tabRefs.current[i] = el
}}
type="button"
role="tab"
id={`${uid}-day-${d}`}
aria-selected={isSel}
aria-controls={`${uid}-panel`}
tabIndex={isSel ? 0 : -1}
className={cx("lb4-day", !daySpan(hours, d) && "is-closed", d === today && "is-today")}
onClick={() => setPicked(d)}
onKeyDown={(e) => onTabKey(e, i)}
>
<span className="lb4-dayname">{c.daysShort[d]}</span>
<span className="lb4-daymark" aria-hidden="true" />
</button>
)
})}
</div>
<p className="lb4-panel" role="tabpanel" id={`${uid}-panel`} aria-labelledby={`${uid}-day-${selected}`}>
<strong>{selected === today ? fill(c.todayLabel, { day: selName }) : selName}</strong>
<span className="lb4-sep" aria-hidden="true">
·
</span>
<span>{selRange}</span>
</p>
</div>
</div>
<div className="lb4-body">
<div className="lb4-col lb4-stack">
<div className="lb4-card lb4-order-card lb4-rise" style={rise(0)}>
<p className="lb4-instruction">{orderInstruction}</p>
{orderEl}
{orderNote ? (
<p className="lb4-note">
<Clock className="lb4-inline" size={16} strokeWidth={2.5} aria-hidden="true" />
{orderNote}
</p>
) : null}
</div>
{links.length ? (
<nav className="lb4-card lb4-links lb4-rise" style={rise(1)} aria-label={c.linksLabel}>
{links.map((link, i) => {
const Icon = KIND_ICON[link.kind ?? "link"]
const cls = cx("lb4-row", i === 0 && state === "hover" && "is-hover", i === 0 && state === "active" && "is-active")
const inner = (
<>
<span className="lb4-disc" aria-hidden="true">
<Icon size={20} strokeWidth={2.5} />
</span>
<span className="lb4-rowtext">
<span className="lb4-rowtitle">{link.title}</span>
{link.detail ? <span className="lb4-rowdetail">{link.detail}</span> : null}
</span>
{link.tag ? <span className="lb4-tag">{link.tag}</span> : null}
</>
)
return link.href ? (
<a
key={i}
className={cls}
href={link.href}
target={link.newTab ? "_blank" : undefined}
rel={link.newTab ? "noopener noreferrer" : undefined}
onClick={press(link, i + 1)}
>
{inner}
</a>
) : (
<button key={i} type="button" className={cls} onClick={press(link, i + 1)}>
{inner}
</button>
)
})}
</nav>
) : null}
{showEmailCapture || specials.length ? (
<div className="lb4-card lb4-specials lb4-rise" style={rise(2)}>
{specialsImage ? (
<img className="lb4-specials-img" src={specialsImage} alt={specialsImageAlt} width={432} height={243} loading="lazy" />
) : null}
{specialsTitle ? <Sub className="lb4-subhead">{specialsTitle}</Sub> : null}
{specialsLead ? <p className="lb4-lead">{specialsLead}</p> : null}
{specials.length ? (
<ul className="lb4-list">
{specials.map((s, i) => (
<li key={i}>
<span className="lb4-listday">{s.day}</span>
<span className="lb4-listname">{s.name}</span>
</li>
))}
</ul>
) : null}
{showEmailCapture ? (
<form className="lb4-form" noValidate onSubmit={handleSubmit}>
<label className="lb4-label" htmlFor={`${uid}-email`}>
{c.emailLabel}
</label>
<input
id={`${uid}-email`}
className="lb4-input"
type="email"
name="email"
autoComplete="email"
inputMode="email"
placeholder={c.emailPlaceholder}
value={email}
disabled={formOff}
aria-invalid={error ? true : undefined}
aria-describedby={error ? `${uid}-error` : undefined}
onChange={(e) => {
setEmail(e.target.value)
if (error) setError(null)
}}
/>
{error ? (
<p className="lb4-error" id={`${uid}-error`} role="alert">
<AlertCircle className="lb4-inline" size={16} strokeWidth={2.5} aria-hidden="true" />
{error}
</p>
) : null}
<button type="submit" className="lb4-send" disabled={formOff || loading} aria-busy={loading || undefined}>
{loading ? (
<>
<Loader2 className="lb4-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
{c.submittingLabel}
</>
) : (
c.submitLabel
)}
</button>
<p className="lb4-privacy">
<Lock className="lb4-inline" size={16} strokeWidth={2.5} aria-hidden="true" />
{c.privacy}
</p>
</form>
) : null}
</div>
) : null}
</div>
</div>
</section>
)
}
export default LinkInBio4
type Clock = { day: number; minutes: number }
type Status =
| { kind: "open" | "closing"; closeAt: number; minutesLeft: number }
| { kind: "closed"; openAt: number; nextOffset: number; nextDay: number }
| { kind: "unknown" }
const WEEKDAY: Record<string, number> = { Sun: 0, Mon: 1, Tue: 2, Wed: 3, Thu: 4, Fri: 5, Sat: 6 }
/** Weekday and minutes since midnight in the shop's own time zone. */
function zonedClock(date: Date, timeZone?: string): Clock {
try {
const parts = new Intl.DateTimeFormat("en-US", {
timeZone,
weekday: "short",
hour: "2-digit",
minute: "2-digit",
hourCycle: "h23",
}).formatToParts(date)
const get = (type: string) => parts.find((p) => p.type === type)?.value ?? ""
const day = WEEKDAY[get("weekday")]
const hour = Number(get("hour")) % 24
const minute = Number(get("minute"))
if (day !== undefined && Number.isFinite(hour) && Number.isFinite(minute)) return { day, minutes: hour * 60 + minute }
} catch {
// Unknown time zone: fall back to the device clock.
}
return { day: date.getDay(), minutes: date.getHours() * 60 + date.getMinutes() }
}
function toMinutes(value?: string): number | null {
if (!value) return null
const m = /^([0-9]{1,2}):?([0-9]{2})?$/.exec(value.trim())
if (!m) return null
const h = Number(m[1])
const min = Number(m[2] ?? 0)
if (h > 24 || min > 59) return null
return h * 60 + min
}
function daySpan(hours: LinkInBio4Hours[], day: number) {
const h = hours[((day % 7) + 7) % 7]
if (!h) return null
const open = toMinutes(h.open)
const close = toMinutes(h.close)
return open != null && close != null && close > open ? { open, close } : null
}
function getStatus(hours: LinkInBio4Hours[], clock: Clock, soon: number): Status {
const today = daySpan(hours, clock.day)
if (today && clock.minutes >= today.open && clock.minutes < today.close) {
const left = today.close - clock.minutes
return { kind: left <= soon ? "closing" : "open", closeAt: today.close, minutesLeft: left }
}
if (today && clock.minutes < today.open) return { kind: "closed", openAt: today.open, nextOffset: 0, nextDay: clock.day }
for (let k = 1; k <= 7; k++) {
const span = daySpan(hours, clock.day + k)
if (span) return { kind: "closed", openAt: span.open, nextOffset: k, nextDay: (clock.day + k) % 7 }
}
return { kind: "unknown" }
}
function formatClock(mins: number, am: string, pm: string) {
const h24 = Math.floor(mins / 60) % 24
const m = mins % 60
const h12 = h24 % 12 || 12
return `${h12}${m ? `:${String(m).padStart(2, "0")}` : ""}${h24 < 12 ? am : pm}`
}
function fill(template: string, vars: Record<string, string | number>) {
return template.replace(/[{]([a-z]+)[}]/gi, (match, key: string) => (key in vars ? String(vars[key]) : match))
}
function cx(...parts: (string | false | null | undefined)[]) {
return parts.filter(Boolean).join(" ")
}
const CSS = `
.cf-link-in-bio-4{--lb4-shadow:var(--shadow,oklch(0.22 0.03 256));--lb4-gutter:clamp(16px,5vw,48px);display:block;width:100%;overflow-x:clip;background:var(--surface,#fff);color:var(--ink,#151b2c);font-family:var(--font-body,system-ui,sans-serif);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5}
.cf-link-in-bio-4 *,.cf-link-in-bio-4 *::before,.cf-link-in-bio-4 *::after{box-sizing:border-box}
.cf-link-in-bio-4 :where(h1,h2,h3,p,ul,li){margin:0;padding:0}
.cf-link-in-bio-4 :where(ul){list-style:none}
.cf-link-in-bio-4 .lb4-col{width:100%;max-width:480px;margin-inline:auto}
.cf-link-in-bio-4 .lb4-band{background:var(--band,#1d2c4d);color:var(--band-ink,#fff);padding:clamp(40px,6vw,72px) var(--lb4-gutter) 104px;text-align:center}
.cf-link-in-bio-4 .lb4-band-inner{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center}
.cf-link-in-bio-4 .lb4-avatar{display:block;width:132px;height:132px;margin-bottom:20px;border-radius:50%;object-fit:cover;object-position:center;filter:drop-shadow(0 2px 3px oklch(from var(--lb4-shadow) calc(l - 0.08) c h / 0.5)) drop-shadow(0 12px 16px oklch(from var(--lb4-shadow) calc(l - 0.08) c h / 0.35))}
.cf-link-in-bio-4 .lb4-name{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;margin-bottom:12px}
.cf-link-in-bio-4 .lb4-tagline{font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;text-wrap:pretty;margin-bottom:24px}
.cf-link-in-bio-4 .lb4-status{width:100%;margin-bottom:12px;padding:14px 16px;background:var(--card,#fff);color:var(--ink,#151b2c);border-radius:var(--radius,12px);box-shadow:var(--shadow-sm,0 1px 3px oklch(from var(--lb4-shadow) l c h / 0.3));text-align:center;text-wrap:balance;line-height:1.35;animation:lb4-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-link-in-bio-4 .lb4-status strong{font-weight:800}
.cf-link-in-bio-4 .lb4-dot{display:inline-block;width:10px;height:10px;margin-inline-end:.55em;border-radius:50%;vertical-align:0.04em;background:var(--muted,#5b6478)}
.cf-link-in-bio-4 .lb4-sep{margin-inline:.45em}
.cf-link-in-bio-4 .lb4-status .lb4-sep{color:var(--muted,#5b6478)}
.cf-link-in-bio-4 .lb4-status.is-open .lb4-dot{background:var(--success,#18794e)}
.cf-link-in-bio-4 .lb4-status.is-open strong{color:var(--success,#18794e)}
.cf-link-in-bio-4 .lb4-status.is-closing .lb4-dot{background:var(--warning,#8a6400)}
.cf-link-in-bio-4 .lb4-status.is-closing strong{color:var(--warning,#8a6400)}
.cf-link-in-bio-4 .lb4-status.is-closed .lb4-dot{background:var(--danger,#c0362c)}
.cf-link-in-bio-4 .lb4-status.is-closed strong{color:var(--danger,#c0362c)}
.cf-link-in-bio-4 .lb4-week{width:100%;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:4px;border-radius:var(--button-radius,var(--radius,12px));background:oklch(from var(--band-ink,#fff) l c h / 0.1)}
.cf-link-in-bio-4 .lb4-day{appearance:none;min-height:52px;padding:6px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:0;border-radius:max(0px,calc(var(--button-radius,var(--radius,12px)) - 4px));background:transparent;color:var(--band-ink,#fff);font-family:var(--font-body,inherit);font-size:0.875rem;font-weight:800;line-height:1.2;cursor:pointer;transition:background .16s ease,color .16s ease,transform .16s ease}
.cf-link-in-bio-4 .lb4-day:hover{background:oklch(from var(--band-ink,#fff) l c h / 0.14)}
.cf-link-in-bio-4 .lb4-day:active{transform:translateY(1px)}
.cf-link-in-bio-4 .lb4-day[aria-selected=true]{background:var(--band-ink,#fff);color:var(--band,#1d2c4d);box-shadow:0 1px 2px oklch(from var(--lb4-shadow) calc(l - 0.1) c h / 0.4)}
.cf-link-in-bio-4 .lb4-day:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:2px}
.cf-link-in-bio-4 .lb4-day.is-closed .lb4-dayname{text-decoration:line-through;text-decoration-thickness:2px}
.cf-link-in-bio-4 .lb4-daymark{width:6px;height:6px;border-radius:50%;background:transparent}
.cf-link-in-bio-4 .lb4-day.is-today .lb4-daymark{background:currentColor}
.cf-link-in-bio-4 .lb4-panel{margin-top:12px;font-size:0.9375rem;font-weight:500;line-height:1.4;text-wrap:balance}
.cf-link-in-bio-4 .lb4-panel strong{font-weight:800}
.cf-link-in-bio-4 .lb4-body{padding:0 var(--lb4-gutter) clamp(64px,8.5vw,120px)}
.cf-link-in-bio-4 .lb4-stack{position:relative;z-index:2;margin-top:-64px;display:flex;flex-direction:column;gap:16px}
.cf-link-in-bio-4 .lb4-card{background:var(--card,#fff);color:var(--ink,#151b2c);border:1px solid var(--card-border,oklch(from var(--ink,#151b2c) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--lb4-shadow) l c h / 0.22),0 4px 10px -2px oklch(from var(--lb4-shadow) l c h / 0.2)));padding:clamp(20px,3vw,32px)}
.cf-link-in-bio-4 .lb4-order-card{text-align:center;border-color:color-mix(in oklch,var(--accent,#2f5ad0) 28%,var(--card,#fff));box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--lb4-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--lb4-shadow) l c h / 0.32))}
.cf-link-in-bio-4 .lb4-instruction{font-weight:600;text-wrap:balance;margin-bottom:16px}
.cf-link-in-bio-4 .lb4-note{margin-top:12px;font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--muted,#5b6478);text-wrap:pretty}
.cf-link-in-bio-4 .lb4-inline{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-link-in-bio-4 .lb4-order{--lb4-bg:var(--button-bg,var(--cta,#d0342c));--lb4-bg2:var(--button-bg-2,var(--cta-2,#b52a22));--lb4-dl:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--lb4-bg) calc(l + 0.04 - var(--lb4-dl)) c h),oklch(from var(--lb4-bg2) calc(l - 0.02 - var(--lb4-dl)) c h));color:var(--button-ink,var(--cta-ink,#fff));font-family:var(--button-font,var(--font-display,inherit));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-decoration:none;text-wrap:balance;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--lb4-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--lb4-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--lb4-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--lb4-shadow) l c h / 0.45));transition:transform .16s ease,box-shadow .16s ease}
.cf-link-in-bio-4 .lb4-order:hover:not(:disabled),.cf-link-in-bio-4 .lb4-order.is-hover{--lb4-dl:0.05;transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--lb4-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--lb4-bg) calc(l - 0.18) c h),0 1px 2px oklch(from var(--lb4-shadow) l c h / 0.32),0 10px 20px -6px oklch(from var(--lb4-shadow) l c h / 0.5))}
.cf-link-in-bio-4 .lb4-order:active:not(:disabled),.cf-link-in-bio-4 .lb4-order.is-active{--lb4-dl:0.08;transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--lb4-bg) calc(l - 0.22) c h / 0.5),inset 0 -2px 0 oklch(from var(--lb4-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--lb4-shadow) l c h / 0.3)}
.cf-link-in-bio-4 .lb4-order:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2f5ad0));outline-offset:3px}
.cf-link-in-bio-4 .lb4-order:disabled{background:var(--button-2-bg,var(--secondary,#e8ebf2));color:var(--button-2-ink,var(--secondary-ink,#151b2c));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 3px oklch(from var(--lb4-shadow) l c h / 0.25)));cursor:not-allowed}
.cf-link-in-bio-4 .lb4-links{padding:0;overflow:hidden}
.cf-link-in-bio-4 .lb4-row{appearance:none;width:100%;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:16px;min-height:80px;padding:16px clamp(16px,3vw,24px);border:0;background:var(--card,#fff);color:var(--ink,#151b2c);font:inherit;text-align:left;text-decoration:none;cursor:pointer;transition:background .16s ease}
.cf-link-in-bio-4 .lb4-row + .lb4-row{border-top:1px solid oklch(from var(--ink,#151b2c) l c h / 0.12)}
.cf-link-in-bio-4 .lb4-row:hover,.cf-link-in-bio-4 .lb4-row.is-hover{background:color-mix(in oklch,var(--ink,#151b2c) 4%,var(--card,#fff))}
.cf-link-in-bio-4 .lb4-row:active,.cf-link-in-bio-4 .lb4-row.is-active{background:var(--button-2-bg,color-mix(in oklch,var(--ink,#151b2c) 8%,var(--card,#fff)))}
.cf-link-in-bio-4 .lb4-row:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2f5ad0));outline-offset:-3px}
.cf-link-in-bio-4 .lb4-disc{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:color-mix(in oklch,var(--ink,#151b2c) 6%,var(--card,#fff));color:var(--accent,#2f5ad0);transition:transform .16s ease}
.cf-link-in-bio-4 .lb4-row:hover .lb4-disc,.cf-link-in-bio-4 .lb4-row.is-hover .lb4-disc{transform:scale(1.06)}
.cf-link-in-bio-4 .lb4-rowtext{display:flex;flex-direction:column;gap:4px;min-width:0}
.cf-link-in-bio-4 .lb4-rowtitle{font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance}
.cf-link-in-bio-4 .lb4-rowdetail{font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--muted,#5b6478);text-wrap:pretty;overflow-wrap:anywhere}
.cf-link-in-bio-4 .lb4-tag{font-size:0.9375rem;font-weight:700;color:var(--link,var(--accent,#2f5ad0));white-space:nowrap;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent,#2f5ad0)) l c h / 0.45);text-underline-offset:0.18em}
.cf-link-in-bio-4 .lb4-row:hover .lb4-tag,.cf-link-in-bio-4 .lb4-row.is-hover .lb4-tag{color:oklch(from var(--link,var(--accent,#2f5ad0)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-link-in-bio-4 .lb4-specials-img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;object-position:center;border-radius:12px;margin-bottom:20px}
.cf-link-in-bio-4 .lb4-subhead{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--accent,#2f5ad0);text-wrap:balance;margin-bottom:8px}
.cf-link-in-bio-4 .lb4-lead{text-wrap:pretty;margin-bottom:16px}
.cf-link-in-bio-4 .lb4-list{margin-bottom:24px;padding:4px 16px;border-radius:10px;background:color-mix(in oklch,var(--ink,#151b2c) 4%,var(--card,#fff))}
.cf-link-in-bio-4 .lb4-list:last-child{margin-bottom:0}
.cf-link-in-bio-4 .lb4-list li{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;align-items:baseline;padding:12px 0}
.cf-link-in-bio-4 .lb4-list li + li{border-top:1px solid oklch(from var(--ink,#151b2c) l c h / 0.12)}
.cf-link-in-bio-4 .lb4-listday{font-size:0.875rem;font-weight:800;line-height:1.2;letter-spacing:0.08em;text-transform:uppercase;color:var(--accent,#2f5ad0)}
.cf-link-in-bio-4 .lb4-listname{font-weight:600;line-height:1.35;text-wrap:pretty}
.cf-link-in-bio-4 .lb4-label{display:block;margin-bottom:8px;font-size:1rem;font-weight:700;color:var(--label-ink,var(--ink,#151b2c))}
.cf-link-in-bio-4 .lb4-input{display:block;width:100%;height:56px;padding:0 16px;font-family:var(--font-body,inherit);font-size:17px;color:var(--field-ink,#151b2c);background:var(--field,#fff);border:1px solid var(--field-border,color-mix(in oklch,var(--ink,#151b2c) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));transition:border-color .16s ease,box-shadow .16s ease}
.cf-link-in-bio-4 .lb4-input::placeholder{color:color-mix(in oklch,var(--field-ink,#151b2c) 65%,var(--field,#fff));opacity:1}
.cf-link-in-bio-4 .lb4-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink,#151b2c) 40%,transparent)}
.cf-link-in-bio-4 .lb4-input:focus{outline:none;border-color:var(--field-focus,var(--accent,#2f5ad0));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent,#2f5ad0)) l c h / 0.35)}
.cf-link-in-bio-4 .lb4-input[aria-invalid=true]{border-color:var(--danger,#c0362c);box-shadow:0 0 0 3px oklch(from var(--danger,#c0362c) l c h / 0.22)}
.cf-link-in-bio-4 .lb4-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--ink,#151b2c) 5%,var(--field,#fff))}
.cf-link-in-bio-4 .lb4-error{margin-top:8px;font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--danger,#c0362c);text-wrap:pretty}
.cf-link-in-bio-4 .lb4-send{--lb4-b2:var(--button-2-bg,var(--secondary,#e8ebf2));margin-top:12px;width:100%;min-height:56px;padding:0 28px;display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--lb4-b2);color:var(--button-2-ink,var(--secondary-ink,#151b2c));font-family:var(--button-font,var(--font-display,inherit));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;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 3px oklch(from var(--lb4-shadow) l c h / 0.25)));cursor:pointer;transition:background .16s ease,transform .16s ease}
.cf-link-in-bio-4 .lb4-send:hover:not(:disabled){background:oklch(from var(--lb4-b2) calc(l - 0.04) c h)}
.cf-link-in-bio-4 .lb4-send:active:not(:disabled){background:oklch(from var(--lb4-b2) calc(l - 0.07) c h);transform:translateY(1px)}
.cf-link-in-bio-4 .lb4-send:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2f5ad0));outline-offset:3px}
.cf-link-in-bio-4 .lb4-send:disabled{cursor:not-allowed;opacity:.7}
.cf-link-in-bio-4 .lb4-send[aria-busy=true]{cursor:progress;opacity:1}
.cf-link-in-bio-4 .lb4-privacy{margin-top:12px;text-align:center;font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--muted,#5b6478);text-wrap:pretty}
.cf-link-in-bio-4 .lb4-spin{animation:lb4-spin .8s linear infinite}
.cf-link-in-bio-4 .lb4-rise{animation:lb4-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * 0.07s),0.28s)}
@keyframes lb4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes lb4-pop{from{transform:scale(.96)}to{transform:none}}
@keyframes lb4-spin{to{transform:rotate(360deg)}}
@media (min-width:720px){.cf-link-in-bio-4 .lb4-avatar{width:148px;height:148px}}
@media (prefers-reduced-motion:reduce){
.cf-link-in-bio-4 .lb4-rise,.cf-link-in-bio-4 .lb4-status,.cf-link-in-bio-4 .lb4-spin{animation:none}
.cf-link-in-bio-4 .lb4-order,.cf-link-in-bio-4 .lb4-row,.cf-link-in-bio-4 .lb4-disc,.cf-link-in-bio-4 .lb4-day,.cf-link-in-bio-4 .lb4-send,.cf-link-in-bio-4 .lb4-input{transition:none}
.cf-link-in-bio-4 .lb4-order:hover:not(:disabled),.cf-link-in-bio-4 .lb4-order.is-hover,.cf-link-in-bio-4 .lb4-row:hover .lb4-disc,.cf-link-in-bio-4 .lb4-row.is-hover .lb4-disc{transform:none}
}
`
pieces/content/link-in-bio-4/specimen.tsx 42 lines
import __studioImagee23470ff from "../assets/20642c3e2c1024cd.webp";
import __studioImage4f70f8df from "../assets/eeac00cd927e531f.webp";
// Specimen: Kettle & Crumb, a fictional neighbourhood bakery. The open status is live, computed from its weekly hours.
import * as React from "react"
import { LinkInBio4 } from "../link-in-bio-4"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"]
type SpecimenState = "default" | "hover" | "active" | "disabled" | "error"
export default function LinkInBio4Specimen({ state = "default" }: { state?: SpecimenState }) {
return (
<LinkInBio4
state={state}
name="Kettle & Crumb"
tagline="Sourdough, morning buns and good coffee on Larch Street."
shopImage={slot(
"scene",
__studioImagee23470ff
)}
shopImageAlt="The Kettle & Crumb shopfront with loaves in the window"
timeZone="America/Chicago"
hours={[
{ open: "08:00", close: "14:00" },
null,
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "16:00" },
{ open: "07:00", close: "15:00" },
]}
specialsImage={slot(
"item-1",
__studioImage4f70f8df
)}
specialsImageAlt="Blood orange morning buns, rye sourdough and a pear galette on the counter"
copy={{ privacy: defaults.sample.registration.privacy }}
/>
)
}
| Name | Type | Details |
|---|---|---|
name OptionalLinkInBio4 |
React.ReactNode |
|
tagline OptionalLinkInBio4 |
React.ReactNode |
|
shopImage OptionalLinkInBio4 |
string |
|
shopImageAlt OptionalLinkInBio4 |
string |
|
hours OptionalLinkInBio4 |
LinkInBio4Hours[] |
|
timeZone OptionalLinkInBio4 |
string |
|
now OptionalLinkInBio4 |
Date | string | number |
|
closingSoonMinutes OptionalLinkInBio4 |
number |
|
weekStart OptionalLinkInBio4 |
0 | 1 |
|
order OptionalLinkInBio4 |
Partial<LinkInBio4Order> |
|
orderDisabled OptionalLinkInBio4 |
boolean |
|
links OptionalLinkInBio4 |
LinkInBio4Link[] |
|
specialsTitle OptionalLinkInBio4 |
React.ReactNode |
|
specialsLead OptionalLinkInBio4 |
React.ReactNode |
|
specials OptionalLinkInBio4 |
LinkInBio4Special[] |
|
specialsImage OptionalLinkInBio4 |
string |
|
specialsImageAlt OptionalLinkInBio4 |
string |
|
showEmailCapture OptionalLinkInBio4 |
boolean |
|
copy OptionalLinkInBio4 |
Partial<LinkInBio4Copy> |
|
headingLevel OptionalLinkInBio4 |
1 | 2 |
|
loading OptionalLinkInBio4 |
boolean |
|
onAction OptionalLinkInBio4 |
(link: LinkInBio4Link, index: number) => void |
|
onSubmit OptionalLinkInBio4 |
(values: { email: string }) => void |
|
state OptionalLinkInBio4 |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalLinkInBio4 |
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.
scene- A wide atmosphere photo behind or beside the copy.
-
20642c3e2c1024cd.webp
image/webp · 134 KB
-
2c539f422023a290.webp
image/webp · 115 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
eeac00cd927e531f.webp
image/webp · 233 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB