Legal Page 2
Terms page block: each clause in full beside a plain-English summary, on one reading path that ends at the action,
Use it in a prompt
Use content/legal-page-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/legal-page-2.tsx. - Import it and pass your copy and images (Props tab):
import { LegalPage2 } from "@/components/funneldna/content/legal-page-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/legal-page-2/component.tsx 643 lines
// layout: path-to-action
// Terms page block: each clause in full beside a plain-English summary, on one reading path that ends at the action,
// with a sticky contents bar and a ‘Summaries only’ switch for the quick read. Trust through transparency.
import * as React from 'react'
import { Building2, CalendarDays, Check, ChevronDown, Flag, Mail, MapPin, MessageSquareText, Printer } from 'lucide-react'
import { FX_HOST, Pattern, Spot } from '../fx/fx'
import shield from '../fx/spots/shield'
export type LegalClause = {
/** Anchor id; generated when empty */
id?: string
/** Shown on the path and in the contents bar; defaults to 01, 02… */
number?: string
title: string
/** The supplied legal text, one entry per paragraph */
legal: React.ReactNode[]
/** Short plain-English summary shown in the grey well */
summary: React.ReactNode
/** Optional ticked key points under the summary */
points?: React.ReactNode[]
}
export type LegalPage2Contact = {
/** Company or legal entity name */
name?: string
email?: string
address?: string
}
export type LegalPage2Copy = {
updatedLabel: string
effectiveLabel: string
printLabel: string
contentsLabel: string
toggleLabel: string
/** Shorter switch label on phones */
toggleShort: string
summaryLabel: string
showLegal: string
hideLegal: string
/** Visible note while Summaries only is on */
modeNote: string
/** Announced when Summaries only turns on */
modeOn: string
/** Announced when it turns off */
modeOff: string
psLabel: string
/** '{email}' is replaced with the contact email link */
actionNote: string
}
export type LegalPage2Props = {
title?: string
/** Phrase inside the title that gets the marker stroke */
titleMark?: string
lead?: React.ReactNode
/** Date the terms last changed, shown after copy.updatedLabel */
updated?: string
/** Date the terms take effect, shown after copy.effectiveLabel */
effective?: string
/** 1 when this block is the page’s first heading */
headingLevel?: 1 | 2
/** The supplied clauses; the component never writes legal text itself */
clauses?: LegalClause[]
/** Start in the summaries-only reading mode */
defaultSummariesOnly?: boolean
contact?: LegalPage2Contact
closeHeading?: string
closeText?: React.ReactNode
/** Button label; an empty string hides the button */
actionLabel?: string
/** P.S. line under the action */
ps?: React.ReactNode
/** Shows the print link in the header */
showPrint?: boolean
/** fx Spot illustration beside the title (imported asset); null hides it */
spot?: string | null
/** Height of a fixed page header above, in px, so the contents bar sticks below it */
stickyOffset?: number
copy?: Partial<LegalPage2Copy>
href?: string
onAction?: (event: React.MouseEvent<HTMLElement>) => void
disabled?: boolean
state?: 'default' | 'hover' | 'active' | 'disabled'
className?: string
}
export function LegalPage2(props: LegalPage2Props) {
const {
title = 'The terms, in full and in plain English.',
titleMark = 'in plain English',
lead = 'The binding text sits on the left. What it means for you, in a sentence or two, sits on the right.',
updated = '',
effective = '',
headingLevel = 2,
clauses = [],
defaultSummariesOnly = false,
contact,
closeHeading = 'Now you know exactly where you stand.',
closeText = '',
actionLabel = 'Get started',
ps = '',
showPrint = true,
spot = shield,
stickyOffset = 0,
href,
onAction,
disabled = false,
state = 'default',
className,
} = props
const copy: LegalPage2Copy = { ...DEFAULT_COPY, ...props.copy }
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '')
const headId = `lp2-h-${uid}`
const [summaries, setSummaries] = React.useState(defaultSummariesOnly)
const [toggled, setToggled] = React.useState(false)
const [open, setOpen] = React.useState<Record<string, boolean>>({})
const [active, setActive] = React.useState(0)
const [progress, setProgress] = React.useState(0)
const [barH, setBarH] = React.useState(64)
const [railEnd, setRailEnd] = React.useState(0)
const barRef = React.useRef<HTMLDivElement>(null)
const listRef = React.useRef<HTMLDivElement>(null)
const chipsRef = React.useRef<HTMLOListElement>(null)
const endRef = React.useRef<HTMLSpanElement>(null)
const clauseRefs = React.useRef<(HTMLDivElement | null)[]>([])
const anchor = React.useRef<{ el: HTMLElement; top: number } | null>(null)
const count = clauses.length
const ids = clauses.map((c, i) => c.id || `lp2-${uid}-${i + 1}`)
const nums = clauses.map((c, i) => c.number || String(i + 1).padStart(2, '0'))
React.useEffect(() => {
setSummaries(defaultSummariesOnly)
}, [defaultSummariesOnly])
React.useEffect(() => {
if (!count) return
let frame = 0
const measure = () => {
frame = 0
const bar = barRef.current
const list = listRef.current
if (bar) setBarH(Math.round(bar.offsetHeight))
if (!list) return
const vh = window.innerHeight || 800
const lr = list.getBoundingClientRect()
const end = endRef.current
const er = end && end.offsetParent ? end.getBoundingClientRect() : null
const endY = er ? er.top + er.height / 2 : lr.bottom
setRailEnd(Math.max(0, Math.round(lr.bottom - endY)))
const top = lr.top + RAIL_TOP
const span = endY - top
const p = span > 0 ? (vh * 0.5 - top) / span : 0
setProgress(Math.round(Math.min(1, Math.max(0, p)) * 1000) / 1000)
const line = (bar ? bar.getBoundingClientRect().bottom : 0) + 56
let index = 0
clauseRefs.current.slice(0, count).forEach((el, i) => {
if (el && el.getBoundingClientRect().top <= line) index = i
})
setActive(index)
}
const schedule = () => {
if (!frame) frame = window.requestAnimationFrame(measure)
}
measure()
document.addEventListener('scroll', schedule, { passive: true, capture: true })
window.addEventListener('resize', schedule)
let ro: ResizeObserver | undefined
if (typeof ResizeObserver !== 'undefined') {
ro = new ResizeObserver(schedule)
if (barRef.current) ro.observe(barRef.current)
if (listRef.current) ro.observe(listRef.current)
}
return () => {
document.removeEventListener('scroll', schedule, { capture: true })
window.removeEventListener('resize', schedule)
ro?.disconnect()
if (frame) window.cancelAnimationFrame(frame)
}
}, [count])
React.useEffect(() => {
const row = chipsRef.current
if (!row || row.scrollWidth <= row.clientWidth) return
const chip = row.querySelectorAll<HTMLElement>('.lp2-chip')[active]
if (!chip) return
const left = chip.offsetLeft - (row.clientWidth - chip.offsetWidth) / 2
row.scrollTo({ left: Math.max(0, left), behavior: prefersReduced() ? 'auto' : 'smooth' })
}, [active])
useIsoLayoutEffect(() => {
const a = anchor.current
anchor.current = null
if (!a) return
const shift = a.el.getBoundingClientRect().top - a.top
if (Math.abs(shift) > 1) window.scrollBy(0, shift)
}, [summaries])
const go = (event: React.MouseEvent<HTMLAnchorElement>, index: number) => {
const el = clauseRefs.current[index]
if (!el) return
event.preventDefault()
el.scrollIntoView({ behavior: prefersReduced() ? 'auto' : 'smooth', block: 'start' })
el.querySelector<HTMLElement>('[data-lp2-title]')?.focus({ preventScroll: true })
setActive(index)
}
const toggle = () => {
const el = clauseRefs.current[active]
anchor.current = el ? { el, top: el.getBoundingClientRect().top } : null
setToggled(true)
setSummaries((v) => !v)
}
const Heading = headingLevel === 1 ? 'h1' : 'h2'
const Sub = headingLevel === 1 ? 'h2' : 'h3'
const isDisabled = disabled || state === 'disabled'
const rootClass = ['cf-legal-page-2', summaries && 'is-summaries', toggled && !summaries && 'is-full-return', className]
.filter(Boolean)
.join(' ')
const rootStyle = { '--lp2-offset': `${stickyOffset}px`, '--lp2-bar-h': `${barH}px` } as React.CSSProperties
const btnClass = ['lp2-btn', state === 'hover' && 'is-hover', state === 'active' && 'is-press'].filter(Boolean).join(' ')
const handleAction = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
event.preventDefault()
return
}
onAction?.(event)
}
const button = href ? (
<a className={btnClass} href={isDisabled ? undefined : href} aria-disabled={isDisabled || undefined} onClick={handleAction}>
{actionLabel}
</a>
) : (
<button type='button' className={btnClass} disabled={isDisabled} onClick={handleAction}>
{actionLabel}
</button>
)
const note = renderNote(copy.actionNote, contact?.email)
const showClose = Boolean(closeHeading || actionLabel)
const hasContact = Boolean(contact && (contact.name || contact.email || contact.address))
const icon = { size: 16, strokeWidth: 2.5, className: 'lp2-ico', 'aria-hidden': true as const }
return (
<section className={rootClass} style={rootStyle} aria-labelledby={headId}>
<style>{CSS}</style>
<div className='lp2-wrap'>
<header className='lp2-head' style={FX_HOST}>
<Pattern name='grid' fade='edges' />
<div className='lp2-head-inner'>
<div className='lp2-head-copy'>
<Heading id={headId} className='lp2-title'>
{markTitle(title, titleMark)}
</Heading>
{lead ? <p className='lp2-lead'>{lead}</p> : null}
{updated || effective || (showPrint && count > 0) ? (
<div className='lp2-meta'>
{updated ? (
<span>
<CalendarDays {...icon} />
{copy.updatedLabel} <strong>{updated}</strong>
</span>
) : null}
{effective ? (
<span>
<CalendarDays {...icon} />
{copy.effectiveLabel} <strong>{effective}</strong>
</span>
) : null}
{showPrint && count > 0 ? (
<button type='button' className='lp2-print' onClick={() => window.print()}>
<Printer {...icon} />
{copy.printLabel}
</button>
) : null}
</div>
) : null}
</div>
{spot ? (
<div className='lp2-spot'>
<Spot src={spot} size={120} />
</div>
) : null}
</div>
</header>
{count > 0 ? (
<div className='lp2-bar' ref={barRef}>
<nav className='lp2-nav' aria-label={copy.contentsLabel}>
<ol className='lp2-chips' ref={chipsRef}>
{clauses.map((c, i) => (
<li key={ids[i]}>
<a
href={`#${ids[i]}`}
className={`lp2-chip${i === active ? ' is-active' : ''}`}
aria-current={i === active ? 'location' : undefined}
onClick={(event) => go(event, i)}
>
<span className='lp2-chip-num' aria-hidden='true'>
{nums[i]}
</span>
<span>{c.title}</span>
</a>
</li>
))}
</ol>
</nav>
<span className='lp2-divider' aria-hidden='true' />
<button type='button' role='switch' aria-checked={summaries} aria-label={copy.toggleLabel} className='lp2-toggle' onClick={toggle}>
<span className='lp2-track' aria-hidden='true'>
<span className='lp2-thumb' />
</span>
<span className='lp2-toggle-long' aria-hidden='true'>{copy.toggleLabel}</span>
<span className='lp2-toggle-short' aria-hidden='true'>{copy.toggleShort}</span>
</button>
</div>
) : null}
<p className='lp2-sr' aria-live='polite'>
{toggled ? (summaries ? copy.modeOn : copy.modeOff) : ''}
</p>
{count > 0 || showClose ? (
<div className='lp2-list' ref={listRef}>
<div className='lp2-rail' aria-hidden='true' style={{ bottom: `${railEnd}px` }}>
<span className='lp2-rail-fill' style={{ transform: `scaleY(${progress})` }} />
</div>
{summaries && count > 0 ? (
<div className='lp2-row lp2-row--note'>
<span className='lp2-stop' aria-hidden='true' />
<p className='lp2-note'>
<Printer {...icon} />
{copy.modeNote}
</p>
</div>
) : null}
{clauses.map((c, i) => {
const id = ids[i]
const legalId = `${id}-legal`
const isOpen = Boolean(open[id])
return (
<div
key={id}
id={id}
ref={(el) => {
clauseRefs.current[i] = el
}}
className={`lp2-row lp2-clause${isOpen ? ' is-open' : ''}`}
style={{ '--i': i } as React.CSSProperties}
>
<span className='lp2-stop' aria-hidden='true'>
<span className='lp2-num'>{nums[i]}</span>
</span>
<div className='lp2-body'>
<Sub className='lp2-ctitle' tabIndex={-1} data-lp2-title=''>
<span className='lp2-inline-num' aria-hidden='true'>
{nums[i]}
</span>
{c.title}
</Sub>
<div className='lp2-pair'>
<div className='lp2-summary'>
<p className='lp2-slabel'>
<MessageSquareText {...icon} />
{copy.summaryLabel}
</p>
<div className='lp2-stext'>{c.summary}</div>
{c.points && c.points.length ? (
<ul className='lp2-points'>
{c.points.map((pt, k) => (
<li key={k}>
<Check size={18} strokeWidth={2.5} aria-hidden='true' className='lp2-pt-ico' />
<span>{pt}</span>
</li>
))}
</ul>
) : null}
<button
type='button'
className='lp2-more'
aria-expanded={isOpen}
aria-controls={legalId}
onClick={() => setOpen((o) => ({ ...o, [id]: !o[id] }))}
>
{isOpen ? copy.hideLegal : copy.showLegal}
<ChevronDown size={16} strokeWidth={2.5} aria-hidden='true' className='lp2-more-ico' />
</button>
</div>
<div className='lp2-legal' id={legalId}>
{c.legal.map((p, k) => (
<p key={k}>{p}</p>
))}
</div>
</div>
</div>
</div>
)
})}
{showClose ? (
<div className='lp2-row lp2-row--close'>
<span className='lp2-stop' aria-hidden='true'>
<span className='lp2-end' ref={endRef}>
<Flag size={20} strokeWidth={2.5} />
</span>
</span>
<div className='lp2-close'>
{closeHeading ? <Sub className='lp2-close-title'>{closeHeading}</Sub> : null}
{closeText ? <p className='lp2-close-text'>{closeText}</p> : null}
{actionLabel ? (
<div className='lp2-action'>
{button}
{note ? <p className='lp2-alt'>{note}</p> : null}
</div>
) : null}
{ps ? (
<p className='lp2-ps'>
<strong>{copy.psLabel}</strong> {ps}
</p>
) : null}
{hasContact && contact ? (
<p className='lp2-contact'>
{contact.name ? (
<span>
<Building2 {...icon} />
{contact.name}
</span>
) : null}
{contact.address ? (
<span>
<MapPin {...icon} />
{contact.address}
</span>
) : null}
{contact.email ? (
<span>
<Mail {...icon} />
<a className='lp2-link' href={`mailto:${contact.email}`}>
{contact.email}
</a>
</span>
) : null}
</p>
) : null}
</div>
</div>
) : null}
</div>
) : null}
</div>
</section>
)
}
export default LegalPage2
const RAIL_TOP = 22
const DEFAULT_COPY: LegalPage2Copy = {
updatedLabel: 'Last updated',
effectiveLabel: 'Effective',
printLabel: 'Print the full terms',
contentsLabel: 'Contents',
toggleLabel: 'Summaries only',
toggleShort: 'Summaries',
summaryLabel: 'In plain English',
showLegal: 'Read the full clause',
hideLegal: 'Hide the full clause',
modeNote: 'Summaries only. Every clause is still here in full: open any one, or print the page for every word.',
modeOn: 'Showing plain-English summaries only. The full terms stay on this page.',
modeOff: 'Showing the full terms beside each summary.',
psLabel: 'P.S.',
actionNote: 'Questions first? Email {email}.',
}
const useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect
function prefersReduced() {
return typeof window !== 'undefined' && Boolean(window.matchMedia) && window.matchMedia('(prefers-reduced-motion: reduce)').matches
}
function markTitle(title: string, mark: string): React.ReactNode {
const at = mark ? title.indexOf(mark) : -1
if (at < 0) return title
return (
<>
{title.slice(0, at)}
<span className='lp2-mark'>{mark}</span>
{title.slice(at + mark.length)}
</>
)
}
function renderNote(template: string, email?: string): React.ReactNode {
if (!template) return null
if (!template.includes('{email}')) return template
if (!email) return null
const parts = template.split('{email}')
return (
<>
{parts[0]}
<a className='lp2-link' href={`mailto:${email}`}>
{email}
</a>
{parts.slice(1).join('')}
</>
)
}
const P = '.cf-legal-page-2.cf-legal-page-2.cf-legal-page-2'
const CSS = `
.cf-legal-page-2{position:relative;background:var(--surface);color:var(--ink);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-legal-page-2 *,.cf-legal-page-2 *::before,.cf-legal-page-2 *::after{box-sizing:border-box}
.cf-legal-page-2 .lp2-wrap{max-width:1120px;margin:0 auto}
.cf-legal-page-2 .lp2-head{border-radius:var(--card-radius,var(--radius,14px))}
.cf-legal-page-2 .lp2-head-inner{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:clamp(32px,5vw,72px);align-items:start;animation:lp2-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-legal-page-2 .lp2-title{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:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
.cf-legal-page-2 .lp2-mark{background-image:linear-gradient(transparent 58%,color-mix(in oklch,var(--marker,#fae37c) 88%,transparent) 58%,color-mix(in oklch,var(--marker,#fae37c) 88%,transparent) 93%,transparent 93%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-inline:.06em;border-radius:2px 5px 3px 6px}
.cf-legal-page-2 .lp2-lead{margin:16px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-legal-page-2 .lp2-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;margin-top:24px;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted)}
.cf-legal-page-2 .lp2-meta strong{color:var(--ink);font-weight:700}
.cf-legal-page-2 .lp2-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;flex:none}
.cf-legal-page-2 .lp2-print,.cf-legal-page-2 .lp2-link{color:var(--link,var(--accent));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em;border-radius:4px}
.cf-legal-page-2 .lp2-print{appearance:none;border:0;background:none;margin:0;padding:6px 0;font:inherit;font-weight:700;cursor:pointer}
.cf-legal-page-2 .lp2-print:hover,.cf-legal-page-2 .lp2-link:hover{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-legal-page-2 .lp2-print:focus-visible,.cf-legal-page-2 .lp2-link:focus-visible,.cf-legal-page-2 .lp2-more:focus-visible{outline:2px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-legal-page-2 .lp2-spot{line-height:0;padding-top:4px}
.cf-legal-page-2 .lp2-bar{position:sticky;top:calc(var(--lp2-offset,0px) + 12px);z-index:5;display:flex;align-items:center;gap:8px;margin-top:clamp(32px,4vw,48px);padding:6px;background:var(--card);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(--shadow,oklch(.22 .03 260)) l c h / .22),0 4px 10px -2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .2)))}
.cf-legal-page-2 .lp2-nav{flex:1;min-width:0}
.cf-legal-page-2 .lp2-chips{position:relative;display:flex;gap:4px;margin:0;padding:0;list-style:none;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
.cf-legal-page-2 .lp2-chips::-webkit-scrollbar{display:none}
.cf-legal-page-2 .lp2-chips li{flex:none}
.cf-legal-page-2 .lp2-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:999px;color:var(--ink);text-decoration:none;font-size:.875rem;line-height:1.2;font-weight:700;white-space:nowrap;transition:background-color .16s ease,box-shadow .16s ease}
.cf-legal-page-2 .lp2-chip-num{font-family:var(--font-display);font-weight:800;font-variant-numeric:tabular-nums;color:var(--muted)}
.cf-legal-page-2 .lp2-chip:hover{background:color-mix(in oklch,var(--ink) 6%,var(--card))}
.cf-legal-page-2 .lp2-chip.is-active{background:color-mix(in oklch,var(--accent) 12%,var(--card));box-shadow:inset 0 0 0 1px oklch(from var(--accent) l c h / .5)}
.cf-legal-page-2 .lp2-chip.is-active .lp2-chip-num{color:var(--ink)}
.cf-legal-page-2 .lp2-chip:focus-visible{outline:2px solid var(--field-focus,var(--accent));outline-offset:-2px}
.cf-legal-page-2 .lp2-divider{flex:none;width:1px;align-self:stretch;margin:8px 2px;background:oklch(from var(--ink) l c h / .14)}
.cf-legal-page-2 .lp2-toggle{flex:none;display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 14px 0 10px;border:0;border-radius:999px;background:color-mix(in oklch,var(--ink) 5%,var(--card));color:var(--ink);font-family:var(--font-body);font-size:.9375rem;line-height:1.2;font-weight:700;white-space:nowrap;cursor:pointer;transition:background-color .16s ease}
.cf-legal-page-2 .lp2-toggle:hover{background:color-mix(in oklch,var(--ink) 9%,var(--card))}
.cf-legal-page-2 .lp2-toggle:focus-visible{outline:2px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-legal-page-2 .lp2-track{position:relative;flex:none;width:40px;height:24px;border-radius:999px;background:color-mix(in oklch,var(--ink) 42%,var(--card));transition:background-color .16s ease}
.cf-legal-page-2 .lp2-thumb{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--card);box-shadow:0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .35);transition:transform .16s ease}
.cf-legal-page-2 .lp2-toggle[aria-checked='true'] .lp2-track{background:var(--accent-fill,var(--accent))}
.cf-legal-page-2 .lp2-toggle[aria-checked='true'] .lp2-thumb{transform:translateX(16px);background:var(--accent-fill-ink,var(--card))}
.cf-legal-page-2 .lp2-toggle-short{display:none}
.cf-legal-page-2 .lp2-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-legal-page-2 .lp2-list{position:relative;margin-top:clamp(40px,5vw,56px)}
.cf-legal-page-2 .lp2-rail{position:absolute;top:${RAIL_TOP}px;left:31px;bottom:0;width:2px;border-radius:2px;overflow:hidden;background:oklch(from var(--ink) l c h / .14)}
.cf-legal-page-2 .lp2-rail-fill{position:absolute;inset:0;background:var(--accent-fill,var(--accent));transform-origin:50% 0;transition:transform .16s linear}
.cf-legal-page-2 .lp2-row{display:grid;grid-template-columns:64px minmax(0,1fr);column-gap:24px;padding-bottom:clamp(48px,5vw,64px)}
.cf-legal-page-2 .lp2-row:last-child{padding-bottom:0}
.cf-legal-page-2 .lp2-row--note{padding-bottom:32px}
.cf-legal-page-2 .lp2-stop{position:relative;z-index:1;display:block;text-align:center}
.cf-legal-page-2 .lp2-num{display:inline-block;padding:0 0 8px;background:var(--surface);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-legal-page-2 .lp2-clause{scroll-margin-top:calc(var(--lp2-offset,0px) + var(--lp2-bar-h,64px) + 32px)}
.cf-legal-page-2 .lp2-ctitle{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink);border-radius:6px}
.cf-legal-page-2 .lp2-ctitle:focus{outline:none}
.cf-legal-page-2 .lp2-ctitle:focus-visible{outline:2px solid var(--field-focus,var(--accent));outline-offset:4px}
.cf-legal-page-2 .lp2-inline-num{display:none;margin-inline-end:.5em;color:var(--accent);font-variant-numeric:tabular-nums}
.cf-legal-page-2 .lp2-pair{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);grid-template-areas:'legal summary';gap:clamp(24px,3.2vw,48px);align-items:start;margin-top:16px}
.cf-legal-page-2 .lp2-legal{grid-area:legal;max-width:64ch}
.cf-legal-page-2 .lp2-legal p{margin:0 0 16px;font-size:1.0625rem;line-height:1.65;color:var(--ink);text-wrap:pretty}
.cf-legal-page-2 .lp2-legal p:last-child{margin-bottom:0}
.cf-legal-page-2 .lp2-summary{grid-area:summary;position:sticky;top:calc(var(--lp2-offset,0px) + var(--lp2-bar-h,64px) + 32px);padding:clamp(20px,2.4vw,28px);border-radius:var(--radius,12px);background:color-mix(in oklch,var(--ink) 4%,var(--surface))}
.cf-legal-page-2 .lp2-slabel{margin:0 0 12px;font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-legal-page-2 .lp2-stext{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:600;color:var(--ink);text-wrap:pretty}
.cf-legal-page-2 .lp2-stext p{margin:0}
.cf-legal-page-2 .lp2-points{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:8px}
.cf-legal-page-2 .lp2-points li{display:flex;align-items:flex-start;gap:10px;font-size:1rem;line-height:1.45;font-weight:500;color:var(--ink);text-wrap:pretty}
.cf-legal-page-2 .lp2-pt-ico{flex:none;margin-top:2px;color:var(--success)}
.cf-legal-page-2 .lp2-more{display:none}
.cf-legal-page-2.is-summaries .lp2-more{display:inline-flex;align-items:center;gap:6px;margin-top:16px;padding:6px 0;border:0;background:none;font-family:var(--font-body);font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--link,var(--accent));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em;cursor:pointer;border-radius:4px}
.cf-legal-page-2.is-summaries .lp2-more:hover{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-legal-page-2 .lp2-more-ico{transition:transform .16s ease}
.cf-legal-page-2 .lp2-clause.is-open .lp2-more-ico{transform:rotate(180deg)}
.cf-legal-page-2.is-summaries .lp2-pair{grid-template-columns:minmax(0,46rem);grid-template-areas:'summary' 'legal';gap:16px}
.cf-legal-page-2.is-summaries .lp2-summary{position:static;animation:lp2-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
.cf-legal-page-2.is-summaries .lp2-legal{display:none}
.cf-legal-page-2.is-summaries .lp2-clause.is-open .lp2-legal{display:block;padding:4px 4px 0;animation:lp2-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-legal-page-2.is-full-return .lp2-legal{animation:lp2-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
.cf-legal-page-2 .lp2-note{margin:0;max-width:46rem;padding:12px 16px;border-radius:var(--radius,12px);background:color-mix(in oklch,var(--ink) 4%,var(--surface));font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--ink);text-wrap:pretty;animation:lp2-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-legal-page-2 .lp2-end{display:inline-grid;place-items:center;width:40px;height:40px;margin-top:clamp(24px,3.4vw,40px);border-radius:50%;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-legal-page-2 .lp2-close{max-width:52rem;padding:clamp(24px,3.4vw,40px);background:var(--card);color:var(--ink);border:1px solid oklch(from var(--accent) l c h / .35);border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .22),0 12px 24px -8px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .32))}
.cf-legal-page-2 .lp2-close-title{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:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
.cf-legal-page-2 .lp2-close-text{margin:16px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-legal-page-2 .lp2-action{margin-top:28px}
.cf-legal-page-2 .lp2-btn{--lp2-b:var(--button-bg,var(--cta));--lp2-s:var(--shadow,oklch(.22 .03 260));display:inline-flex;align-items:center;justify-content:center;min-height:72px;min-width:min(100%,320px);padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(180deg,oklch(from var(--lp2-b) 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));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-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--lp2-b) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--lp2-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--lp2-s) l c h / .3),0 8px 16px -6px oklch(from var(--lp2-s) l c h / .4));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-legal-page-2 .lp2-btn:hover:not(:disabled):not([aria-disabled='true']),.cf-legal-page-2 .lp2-btn.is-hover{background:linear-gradient(180deg,oklch(from var(--lp2-b) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--lp2-b) calc(l + 0.1) c h / .7),inset 0 -3px 0 oklch(from var(--lp2-b) calc(l - 0.2) c h),0 1px 2px oklch(from var(--lp2-s) l c h / .34),0 10px 20px -6px oklch(from var(--lp2-s) l c h / .5))}
.cf-legal-page-2 .lp2-btn:active:not(:disabled):not([aria-disabled='true']),.cf-legal-page-2 .lp2-btn.is-press{transform:translateY(1px);background:linear-gradient(180deg,oklch(from var(--lp2-b) calc(l - 0.06) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.04) c h));box-shadow:inset 0 2px 4px oklch(from var(--lp2-s) l c h / .35),inset 0 -2px 0 oklch(from var(--lp2-b) calc(l - 0.16) c h),0 1px 1px oklch(from var(--lp2-s) l c h / .25)}
.cf-legal-page-2 .lp2-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-legal-page-2 .lp2-btn:disabled,.cf-legal-page-2 .lp2-btn[aria-disabled='true']{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none;cursor:not-allowed;transform:none}
.cf-legal-page-2 .lp2-alt{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-legal-page-2 .lp2-ps{margin:24px 0 0;max-width:60ch;font-size:1.0625rem;line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-legal-page-2 .lp2-ps strong{font-weight:800}
.cf-legal-page-2 .lp2-contact{display:flex;flex-wrap:wrap;gap:8px 24px;margin:24px 0 0;padding-top:20px;border-top:1px solid oklch(from var(--ink) l c h / .12);font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted)}
@keyframes lp2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:759px){
.cf-legal-page-2 .lp2-head-inner{grid-template-columns:minmax(0,1fr)}
.cf-legal-page-2 .lp2-spot{display:none}
.cf-legal-page-2 .lp2-bar{top:calc(var(--lp2-offset,0px) + 8px)}
.cf-legal-page-2 .lp2-chip{padding:0 12px}
.cf-legal-page-2 .lp2-toggle{gap:8px;padding:0 12px 0 8px}
.cf-legal-page-2 .lp2-toggle-long{display:none}
.cf-legal-page-2 .lp2-toggle-short{display:inline}
.cf-legal-page-2 .lp2-rail,.cf-legal-page-2 .lp2-stop{display:none}
.cf-legal-page-2 .lp2-row{display:block;padding-bottom:40px}
.cf-legal-page-2 .lp2-row--note{padding-bottom:24px}
.cf-legal-page-2 .lp2-inline-num{display:inline}
.cf-legal-page-2 .lp2-pair{grid-template-columns:minmax(0,1fr);grid-template-areas:'summary' 'legal';gap:16px}
.cf-legal-page-2 .lp2-summary{position:static}
.cf-legal-page-2 .lp2-btn{width:100%;min-width:0;padding:0 20px}
}
/* !important: reduced motion must beat every state selector above. */
@media (prefers-reduced-motion: reduce){
.cf-legal-page-2 *,.cf-legal-page-2 *::before,.cf-legal-page-2 *::after{animation:none !important;transition:none !important}
}
@media print{
.cf-legal-page-2{padding:0;background:none}
${P} .lp2-bar,${P} .lp2-spot,${P} .lp2-rail,${P} .lp2-stop,${P} .lp2-print,${P} .lp2-row--note,${P} .lp2-more,${P} .lp2-action,${P} .lp2-ps,${P} .lp2-close-title,${P} .lp2-close-text{display:none}
${P} .lp2-head-inner{display:block;animation:none}
${P} .lp2-mark{background:none}
${P} .lp2-row{display:block;padding-bottom:24pt}
${P} .lp2-inline-num{display:inline}
${P} .lp2-pair{display:block}
${P} .lp2-summary{position:static;margin-bottom:12pt;padding:10pt 12pt;border:1px solid oklch(from var(--ink) l c h / .25);break-inside:avoid;animation:none}
${P} .lp2-legal{display:block;max-width:none;padding:0;animation:none}
${P} .lp2-ctitle{break-after:avoid}
${P} .lp2-close{max-width:none;padding:0;border:0;box-shadow:none}
${P} .lp2-contact{margin-top:0}
}
`
pieces/content/legal-page-2/specimen.tsx 89 lines
import * as React from 'react'
import LegalPage2 from '../legal-page-2'
import defaults from '../../studio-defaults.json'
export const states = ['default', 'hover', 'active', 'disabled']
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled'
export default function LegalPage2Specimen({ state = 'default' }: { state?: SpecimenState }) {
const guarantee = defaults.sample.guarantee.toLowerCase()
return (
<LegalPage2
title='Tidyform terms, in full and in plain English.'
titleMark='in plain English'
lead='The binding text sits on the left. What it means for you, in a sentence or two, sits on the right.'
updated='November 3, 2026'
effective='December 1, 2026'
clauses={[
{
id: 'account',
title: 'Your account',
legal: [
'You must be at least 16 years old, or the age of digital consent in your country if higher, to create a Tidyform account. You agree to provide accurate registration information and to keep it up to date.',
'You are responsible for safeguarding your login credentials and for all activity that occurs under your account. You must notify Tidyform promptly at legal@tidyform.example of any unauthorized access to or use of your account.',
],
summary: 'You need to be 16 or older. Keep your password safe, because anything done from your login counts as you.',
},
{
id: 'your-data',
title: 'Your forms and your data',
legal: [
'As between you and Tidyform, you retain all right, title and interest in and to the forms you create and the responses you collect through the Service (“Customer Content”).',
'You grant Tidyform a limited, non-exclusive, worldwide license to host, copy, process and display Customer Content solely as necessary to provide, secure and support the Service. You may export Customer Content at any time in CSV or JSON format.',
],
summary: 'You own your forms and every response. We only touch them to run Tidyform for you.',
points: ['Export everything as CSV or JSON, any time', 'Your data is used only to run the service'],
},
{
id: 'acceptable-use',
title: 'Acceptable use',
legal: [
'You may not use the Service to (a) collect passwords, payment card numbers or government identification numbers outside a designated secure field; (b) send unsolicited commercial messages; (c) impersonate any person or organization; or (d) distribute malware or phishing content.',
'Tidyform may suspend or disable any form that it reasonably believes violates this Section, and will notify the account owner by email where permitted by law.',
],
summary: 'No phishing, no spam, no collecting card numbers in plain fields. Break the rules and we can switch that form off.',
},
{
id: 'billing',
title: 'Plans, billing and refunds',
legal: [
'Paid plans are billed in advance on a monthly or annual basis and renew automatically at the end of each billing period until cancelled. You may cancel at any time from Settings › Billing; cancellation takes effect at the end of the current billing period.',
'If you are not satisfied with your first paid plan, you may request a full refund of the initial charge within thirty (30) days of that charge by contacting billing@tidyform.example. Renewal charges are non-refundable except where required by law.',
],
summary: `Plans renew until you cancel, and you can cancel any time from Billing. Your first paid plan comes with a ${guarantee}.`,
points: ['Cancel any time from Settings', 'Renewal charges are not refunded'],
},
{
id: 'availability',
title: 'Uptime and liability',
legal: [
'Tidyform will use commercially reasonable efforts to keep the Service available, excluding scheduled maintenance announced at least 24 hours in advance. THE SERVICE IS OTHERWISE PROVIDED “AS IS” AND “AS AVAILABLE”, WITHOUT WARRANTIES OF ANY KIND.',
'To the maximum extent permitted by law, Tidyform’s total liability arising out of these Terms will not exceed the amounts you paid Tidyform in the twelve (12) months before the claim.',
],
summary: 'We work to keep your forms online and warn you a day before planned maintenance. If something goes wrong, our liability is capped at what you paid in the last year.',
},
{
id: 'changes',
title: 'Changes to these terms',
legal: [
'Tidyform may modify these Terms from time to time. If a change is material, Tidyform will notify you by email at least thirty (30) days before it takes effect.',
'Your continued use of the Service after the effective date of the revised Terms constitutes acceptance of them. If you do not agree, you may close your account before that date.',
],
summary: 'Big changes get 30 days’ notice by email. Don’t like them? Close your account before they start.',
},
]}
contact={{
name: 'Tidyform Labs, Inc.',
email: 'legal@tidyform.example',
address: '2140 Example Avenue, Suite 300, Portland, OR 97209',
}}
closeHeading='Now you know exactly where you stand.'
closeText='Clear terms, your data, and forms that just work. Build your first one today.'
actionLabel='Build my first form'
ps='You own every form you build and every response you collect. That’s clause 02, in full and in plain English.'
href='#start'
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
title OptionalLegalPage2 |
string |
|
titleMark OptionalLegalPage2 |
string |
|
lead OptionalLegalPage2 |
React.ReactNode |
|
updated OptionalLegalPage2 |
string |
|
effective OptionalLegalPage2 |
string |
|
headingLevel OptionalLegalPage2 |
1 | 2 |
|
clauses OptionalLegalPage2 |
LegalClause[] |
|
defaultSummariesOnly OptionalLegalPage2 |
boolean |
|
contact OptionalLegalPage2 |
LegalPage2Contact |
|
closeHeading OptionalLegalPage2 |
string |
|
closeText OptionalLegalPage2 |
React.ReactNode |
|
actionLabel OptionalLegalPage2 |
string |
|
ps OptionalLegalPage2 |
React.ReactNode |
|
showPrint OptionalLegalPage2 |
boolean |
|
spot OptionalLegalPage2 |
string | null |
|
stickyOffset OptionalLegalPage2 |
number |
|
copy OptionalLegalPage2 |
Partial<LegalPage2Copy> |
|
href OptionalLegalPage2 |
string |
|
onAction OptionalLegalPage2 |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalLegalPage2 |
boolean |
|
state OptionalLegalPage2 |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalLegalPage2 |
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.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
7d6f1c81c93d8f71.webp
image/webp · 18.2 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB