Sales Nav 1
Sales nav: benefit-led links, a trust strip and a two-line CTA that never leaves the screen. It shrinks to a compact
Use it in a prompt
Use nav/sales-nav 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/nav/sales-nav.tsx. - Import it and pass your copy and images (Props tab):
import { SalesNav } from "@/components/funneldna/nav/sales-nav"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/nav/sales-nav/component.tsx 566 lines
// layout: scroll-panels
// Sales nav: benefit-led links, a trust strip and a two-line CTA that never leaves the screen. It shrinks to a compact
// sticky bar with a scroll progress rail. On phones a drawer of stacked panels builds down to a pinned price and CTA.
import React from 'react'
import { Menu, Phone, Route, ShieldCheck, X } from 'lucide-react'
export type SalesNavLink = {
label: string
href: string
/** One benefit line under the label in the phone drawer. */
detail?: string
}
export type SalesNavLetter = {
salutation?: string
body?: React.ReactNode[]
/** Owner sign-off shown before the pinned action. */
signoff?: string
}
export type SalesNavPhone = {
/** Text before the number, e.g. 'Questions? Call'. */
label?: string
number: string
href: string
}
export type SalesNavCopy = {
navLabel?: string
openMenu?: string
closeMenu?: string
menuTitle?: string
/** Accessible name of the logo link; {brand} is replaced with brandName. */
homeLabel?: string
}
export type SalesNavProps = {
brandName?: string
/** Logo slot image. When empty, the wordmark shows. */
logoImage?: string
logoAlt?: string
homeHref?: string
/** Three to six benefit-led links. */
links?: SalesNavLink[]
label?: string
/** Benefit line inside the button, under the action. */
sublabel?: string
/** Shorter action label used on small phones. */
compactLabel?: string
href?: string
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void
/** Reassurance shown in the top strip and the drawer, e.g. the guarantee. */
trustLine?: string
price?: string
/** Supplied breakdown shown beside the price. */
priceBreakdown?: string
phone?: SalesNavPhone
/** Short letter-voice note above the pinned action in the drawer. */
letter?: SalesNavLetter
/** Sticks to the top and shrinks on scroll. */
sticky?: boolean
/** Forces the compact bar. */
compact?: boolean
defaultOpen?: boolean
/** Marks the current link. When unset, the section in view is tracked. */
activeHref?: string
disabled?: boolean
state?: 'default' | 'hover' | 'active' | 'disabled'
copy?: SalesNavCopy
className?: string
}
const DEFAULT_LINKS: SalesNavLink[] = [
{ label: 'Plan your pages', href: '#plan', detail: 'Map your offer and the pages your funnel needs.' },
{ label: 'Write your copy', href: '#copy', detail: 'Draft your headline, offer and call to action.' },
{ label: 'Launch without gaps', href: '#launch', detail: 'Check every link, form and next step first.' },
{ label: 'See the offer', href: '#offer', detail: 'Everything you get, in one place.' },
]
const DEFAULT_COPY: Required<SalesNavCopy> = {
navLabel: 'Main',
openMenu: 'Open menu',
closeMenu: 'Close menu',
menuTitle: 'Menu',
homeLabel: '{brand} home',
}
export function SalesNav({
brandName = 'Funnel Starter',
logoImage,
logoAlt,
homeHref = '#',
links = DEFAULT_LINKS,
label = 'Get the Starter Kit',
sublabel = 'See everything inside',
compactLabel = 'Get the kit',
href,
onAction,
trustLine,
price,
priceBreakdown,
phone,
letter,
sticky = true,
compact: forceCompact = false,
defaultOpen = false,
activeHref,
disabled: disabledProp = false,
state = 'default',
copy: copyProp,
className,
}: SalesNavProps) {
const copy = { ...DEFAULT_COPY, ...copyProp }
const items = links.slice(0, 6)
const count = Math.min(6, Math.max(3, items.length))
const disabled = disabledProp || state === 'disabled'
const forced = state === 'hover' || state === 'active' ? state : undefined
const [open, setOpen] = React.useState(defaultOpen)
const [scrolled, setScrolled] = React.useState(false)
const [progress, setProgress] = React.useState(0)
const [spy, setSpy] = React.useState<string | undefined>(undefined)
const toggleRef = React.useRef<HTMLButtonElement>(null)
const closeRef = React.useRef<HTMLButtonElement>(null)
const drawerRef = React.useRef<HTMLDivElement>(null)
const panelRef = React.useRef<HTMLDivElement>(null)
const drawerId = 'cf-sales-nav-' + React.useId().replace(/:/g, '')
const compact = forceCompact || (sticky && scrolled)
const current = activeHref ?? spy
const hrefKey = items.map((link) => link.href).join('|')
React.useEffect(() => {
if (!sticky) {
setScrolled(false)
return
}
let frame = 0
const read = () => {
frame = 0
const y = window.scrollY
setScrolled((was) => (was ? y > 24 : y > 80))
const max = document.documentElement.scrollHeight - window.innerHeight
setProgress(max > 0 ? Math.min(1, Math.max(0, y / max)) : 0)
}
const onScroll = () => {
if (!frame) frame = window.requestAnimationFrame(read)
}
read()
window.addEventListener('scroll', onScroll, { passive: true })
window.addEventListener('resize', onScroll)
return () => {
window.removeEventListener('scroll', onScroll)
window.removeEventListener('resize', onScroll)
if (frame) window.cancelAnimationFrame(frame)
}
}, [sticky])
React.useEffect(() => {
if (activeHref !== undefined || typeof IntersectionObserver === 'undefined') return
const targets: Element[] = []
hrefKey.split('|').forEach((target) => {
if (!target.startsWith('#') || target.length < 2) return
const el = document.getElementById(target.slice(1))
if (el) targets.push(el)
})
if (!targets.length) return
const observer = new IntersectionObserver(
(entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) setSpy('#' + entry.target.id)
})
},
{ rootMargin: '-35% 0px -55% 0px' },
)
targets.forEach((target) => observer.observe(target))
return () => observer.disconnect()
}, [activeHref, hrefKey])
const closeMenu = React.useCallback((restoreFocus: boolean) => {
setOpen(false)
if (restoreFocus) window.requestAnimationFrame(() => toggleRef.current?.focus())
}, [])
React.useEffect(() => {
const drawer = drawerRef.current
if (drawer) drawer.toggleAttribute('inert', !open)
if (!open) return
const body = document.body
const before = body.style.overflow
body.style.overflow = 'hidden'
const frame = window.requestAnimationFrame(() => closeRef.current?.focus())
const onKey = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
event.preventDefault()
closeMenu(true)
return
}
const panel = panelRef.current
if (event.key !== 'Tab' || !panel) return
const nodes = Array.from(panel.querySelectorAll<HTMLElement>('a[href], button:not([disabled])'))
if (!nodes.length) return
const first = nodes[0]
const last = nodes[nodes.length - 1]
const active = document.activeElement
const outside = !panel.contains(active)
if (event.shiftKey && (active === first || outside)) {
event.preventDefault()
last.focus()
} else if (!event.shiftKey && (active === last || outside)) {
event.preventDefault()
first.focus()
}
}
document.addEventListener('keydown', onKey)
return () => {
window.cancelAnimationFrame(frame)
body.style.overflow = before
document.removeEventListener('keydown', onKey)
}
}, [open, closeMenu])
const cta = (variant: 'bar' | 'drawer') => {
const cls = 'cf-sales-nav__cta cf-sales-nav__cta--' + variant
const hasShort = variant === 'bar' && Boolean(compactLabel)
const inner = (
<>
<span className='cf-sales-nav__cta-main'>
<span className='cf-sales-nav__cta-full'>{label}</span>
{hasShort ? <span className='cf-sales-nav__cta-short'>{compactLabel}</span> : null}
</span>
{sublabel ? (
<span className='cf-sales-nav__cta-sub'>
<span>{sublabel}</span>
</span>
) : null}
</>
)
const handle = (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => {
if (disabled) {
event.preventDefault()
return
}
onAction?.(event)
if (variant === 'drawer') closeMenu(false)
}
if (href && !disabled) {
return (
<a className={cls} href={href} onClick={handle} data-state={forced} data-short={hasShort ? '' : undefined}>
{inner}
</a>
)
}
return (
<button type='button' className={cls} onClick={handle} disabled={disabled} data-state={forced} data-short={hasShort ? '' : undefined}>
{inner}
</button>
)
}
const brand = (where: 'bar' | 'drawer') => (
<a
className={'cf-sales-nav__brand cf-sales-nav__brand--' + where}
href={homeHref}
aria-label={copy.homeLabel.replace('{brand}', brandName)}
onClick={where === 'drawer' ? () => closeMenu(false) : undefined}
>
{logoImage ? (
<img className='cf-sales-nav__logo' src={logoImage} alt={logoAlt ?? brandName} />
) : (
<>
<span className='cf-sales-nav__mark' aria-hidden='true'>
<Route strokeWidth={2.5} />
</span>
<span className='cf-sales-nav__word'>{brandName}</span>
</>
)}
</a>
)
const lead = trustLine ? 'trust' : price ? 'price' : 'phone'
const hasStrip = Boolean(trustLine || price || phone)
const style = { '--cf-sn-progress': progress } as React.CSSProperties
let reveal = 0
const delay = () => ({ animationDelay: Math.min(reveal++ * 0.07, 0.28) + 's' })
return (
<header
className={['cf-sales-nav', className].filter(Boolean).join(' ')}
data-sticky={sticky ? 'true' : 'false'}
data-compact={compact ? 'true' : 'false'}
data-count={String(count)}
style={style}
>
<style>{CSS}</style>
<div className='cf-sales-nav__frame'>
{hasStrip ? (
<div className='cf-sales-nav__strip'>
<div className='cf-sales-nav__strip-clip'>
<div className='cf-sales-nav__strip-row'>
{trustLine ? (
<p className={'cf-sales-nav__strip-item cf-sales-nav__strip-trust' + (lead === 'trust' ? ' is-lead' : '')}>
<ShieldCheck aria-hidden strokeWidth={2.5} />
{trustLine}
</p>
) : null}
{price ? (
<p className={'cf-sales-nav__strip-item cf-sales-nav__strip-price' + (lead === 'price' ? ' is-lead' : '')}>
<b>{price}</b>
{priceBreakdown ? ' ' + priceBreakdown : null}
</p>
) : null}
{phone ? (
<p className={'cf-sales-nav__strip-item cf-sales-nav__strip-phone' + (lead === 'phone' ? ' is-lead' : '')}>
<Phone aria-hidden strokeWidth={2.5} />
{phone.label ? phone.label + ' ' : null}
<a href={phone.href}>{phone.number}</a>
</p>
) : null}
</div>
</div>
</div>
) : null}
<div className='cf-sales-nav__bar'>
<div className='cf-sales-nav__row'>
{brand('bar')}
<nav className='cf-sales-nav__links' aria-label={copy.navLabel}>
<ul>
{items.map((link) => (
<li key={link.href + link.label}>
<a className='cf-sales-nav__link' href={link.href} aria-current={current === link.href ? 'true' : undefined}>
<span className='cf-sales-nav__link-text'>{link.label}</span>
</a>
</li>
))}
</ul>
</nav>
<div className='cf-sales-nav__actions'>
{cta('bar')}
<button
ref={toggleRef}
type='button'
className='cf-sales-nav__icon-btn cf-sales-nav__menu'
aria-label={copy.openMenu}
aria-expanded={open}
aria-controls={drawerId}
aria-haspopup='dialog'
onClick={() => setOpen(true)}
>
<Menu aria-hidden strokeWidth={2.5} />
</button>
</div>
</div>
{sticky ? <span className='cf-sales-nav__progress' aria-hidden='true' /> : null}
</div>
</div>
<div ref={drawerRef} id={drawerId} className='cf-sales-nav__drawer' data-open={open ? 'true' : 'false'} aria-hidden={!open}>
<div className='cf-sales-nav__scrim' onClick={() => closeMenu(true)} />
<div ref={panelRef} className='cf-sales-nav__panel' role='dialog' aria-modal='true' aria-label={copy.menuTitle}>
<div className='cf-sales-nav__panel-head'>
{brand('drawer')}
<button ref={closeRef} type='button' className='cf-sales-nav__icon-btn' aria-label={copy.closeMenu} onClick={() => closeMenu(true)}>
<X aria-hidden strokeWidth={2.5} />
</button>
</div>
<ul className='cf-sales-nav__list'>
{items.map((link, index) => (
<li key={link.href + link.label} className='cf-sales-nav__item cf-sales-nav__reveal' style={delay()}>
<a
className='cf-sales-nav__panel-link'
href={link.href}
aria-current={current === link.href ? 'true' : undefined}
onClick={() => closeMenu(false)}
>
<span className='cf-sales-nav__num' aria-hidden='true'>
{String(index + 1).padStart(2, '0')}
</span>
<span>
<span className='cf-sales-nav__panel-label'>{link.label}</span>
{link.detail ? <span className='cf-sales-nav__panel-detail'>{link.detail}</span> : null}
</span>
</a>
</li>
))}
{letter && (letter.salutation || letter.body?.length || letter.signoff) ? (
<li className='cf-sales-nav__letter cf-sales-nav__reveal' style={delay()}>
{letter.salutation ? <p className='cf-sales-nav__salute'>{letter.salutation}</p> : null}
{(letter.body ?? []).map((paragraph, index) => (
<p key={index} className='cf-sales-nav__letter-p'>
{paragraph}
</p>
))}
{letter.signoff ? <p className='cf-sales-nav__signoff'>{letter.signoff}</p> : null}
</li>
) : null}
</ul>
<div className='cf-sales-nav__foot'>
{price ? (
<p className='cf-sales-nav__price'>
<span className='cf-sales-nav__price-big'>{price}</span>
{priceBreakdown ? <span className='cf-sales-nav__price-note'>{priceBreakdown}</span> : null}
</p>
) : null}
{cta('drawer')}
{trustLine || phone ? (
<p className='cf-sales-nav__fine'>
{trustLine ? (
<span>
<ShieldCheck aria-hidden strokeWidth={2.5} className='cf-sales-nav__fine-shield' />
{trustLine}
</span>
) : null}
{phone ? (
<a className='cf-sales-nav__fine-phone' href={phone.href}>
<Phone aria-hidden strokeWidth={2.5} />
{phone.label ? phone.label + ' ' : null}
{phone.number}
</a>
) : null}
</p>
) : null}
</div>
</div>
</div>
</header>
)
}
export default SalesNav
// Wide (desktop) rules, applied once the bar is wide enough for its link count.
function wide(s: string) {
return `
${s} .cf-sales-nav__row{padding-block:16px;gap:24px}
${s}[data-compact='true'] .cf-sales-nav__row{padding-block:8px}
${s} .cf-sales-nav__links{display:flex}
${s} .cf-sales-nav__menu{display:none}
${s} .cf-sales-nav__actions{margin-left:0}
${s} .cf-sales-nav__cta--bar{min-height:60px;padding:8px 28px}
${s} .cf-sales-nav__cta--bar .cf-sales-nav__cta-main{font-size:1.125rem}
${s} .cf-sales-nav__cta--bar .cf-sales-nav__cta-sub{display:grid}
${s}[data-compact='true'] .cf-sales-nav__cta--bar{min-height:46px;padding-block:6px}
${s}[data-compact='true'] .cf-sales-nav__cta--bar .cf-sales-nav__cta-sub{grid-template-rows:0fr;opacity:0}
${s} .cf-sales-nav__logo{height:38px}
${s}[data-compact='true'] .cf-sales-nav__logo{height:30px}
${s}[data-compact='true'] .cf-sales-nav__mark{width:32px;height:32px}
`
}
// Reduced motion keeps !important so it beats every state selector without duplicating them.
const CSS = `
.cf-sales-nav{--cf-sn-g:clamp(16px,5vw,48px);--cf-sn-ease:cubic-bezier(.2,.7,.2,1);--cf-sn-line:oklch(from var(--ink) l c h / .12);--cf-sn-quiet:color-mix(in oklch,var(--ink) 4%,var(--card));--cf-sn-ring:oklch(from var(--field-focus,var(--accent)) l c h / .45);--cf-sn-shade:var(--shadow,oklch(.22 .03 260));position:relative;z-index:50;width:100%;font-family:var(--font-body);color:var(--ink);-webkit-font-smoothing:antialiased}
/* The size container wraps only the strip and bar: containment on the header made it the containing block of the fixed drawer, squashing the phone menu to the bar's height. */
.cf-sales-nav__frame{container:cf-sales-nav / inline-size}
.cf-sales-nav[data-sticky='true']{position:sticky;top:0}
.cf-sales-nav *,.cf-sales-nav *::before,.cf-sales-nav *::after{box-sizing:border-box}
.cf-sales-nav__strip{display:grid;grid-template-rows:1fr;background:var(--band);color:var(--band-ink);transition:grid-template-rows .28s var(--cf-sn-ease)}
.cf-sales-nav[data-compact='true'] .cf-sales-nav__strip{grid-template-rows:0fr}
.cf-sales-nav__strip-clip{min-height:0;overflow:hidden}
.cf-sales-nav__strip-row{max-width:1440px;margin:0 auto;padding:8px var(--cf-sn-g);display:flex;align-items:center;justify-content:center;gap:8px 24px;text-align:center}
.cf-sales-nav__strip-item{display:none;margin:0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--band-ink);text-wrap:pretty}
.cf-sales-nav__strip-item.is-lead{display:block}
.cf-sales-nav__strip-item b{font-weight:800}
.cf-sales-nav__strip-item svg{display:inline-block;width:16px;height:16px;vertical-align:-.2em;margin-inline-end:.4em}
.cf-sales-nav__strip-item a{color:var(--band-ink);font-weight:800;text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / .5);text-underline-offset:.18em;border-radius:4px}
.cf-sales-nav__strip-item a:hover{text-decoration-color:var(--band-ink)}
.cf-sales-nav__strip-item a:focus-visible{outline:2px solid var(--band-ink);outline-offset:2px}
@container cf-sales-nav (min-width:720px){.cf-sales-nav__strip-row{justify-content:space-between;text-align:left}.cf-sales-nav__strip-trust,.cf-sales-nav__strip-phone{display:block}}
@container cf-sales-nav (min-width:960px){.cf-sales-nav__strip-item{display:block}}
.cf-sales-nav__bar{position:relative;background:var(--card);color:var(--ink);border-bottom:1px solid var(--cf-sn-line);transition:box-shadow .2s ease}
.cf-sales-nav[data-compact='true'] .cf-sales-nav__bar{box-shadow:var(--shadow-md,0 1px 2px oklch(.22 .03 260 / .22),0 4px 10px -2px oklch(.22 .03 260 / .2))}
.cf-sales-nav__row{max-width:1440px;margin:0 auto;padding:12px var(--cf-sn-g);display:flex;align-items:center;gap:12px;transition:padding .28s var(--cf-sn-ease)}
.cf-sales-nav[data-compact='true'] .cf-sales-nav__row{padding-block:8px}
.cf-sales-nav__progress{position:absolute;left:0;right:0;bottom:-1px;height:3px;background:var(--accent-fill,var(--accent));transform-origin:0 50%;transform:scaleX(var(--cf-sn-progress,0));opacity:0;transition:opacity .2s ease;pointer-events:none}
.cf-sales-nav[data-compact='true'][data-sticky='true'] .cf-sales-nav__progress{opacity:1}
.cf-sales-nav__brand{display:inline-flex;align-items:center;gap:10px;flex:0 0 auto;min-height:44px;color:var(--ink);text-decoration:none;border-radius:8px}
.cf-sales-nav__brand:focus-visible{outline:3px solid var(--cf-sn-ring);outline-offset:3px}
.cf-sales-nav__mark{display:grid;place-items:center;width:32px;height:32px;flex:0 0 auto;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));transition:width .28s var(--cf-sn-ease),height .28s var(--cf-sn-ease)}
.cf-sales-nav__mark svg{width:18px;height:18px}
.cf-sales-nav__word{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:1.0625rem;line-height:1;white-space:nowrap}
.cf-sales-nav__logo{display:block;height:32px;width:auto;max-width:170px;object-fit:contain;border-radius:0;transition:height .28s var(--cf-sn-ease)}
.cf-sales-nav__links{display:none;flex:1 1 auto;justify-content:center;min-width:0}
.cf-sales-nav__links ul{display:flex;align-items:center;gap:4px;margin:0;padding:0;list-style:none}
.cf-sales-nav__link{display:inline-flex;align-items:center;min-height:44px;padding:0 clamp(8px,.9vw,14px);border-radius:calc(var(--radius,12px) - 2px);color:var(--ink);font-family:var(--font-body);font-size:.9375rem;line-height:1.2;font-weight:700;text-decoration:none;white-space:nowrap;transition:background-color .16s ease,color .16s ease}
.cf-sales-nav__link:active .cf-sales-nav__link-text{transform:translateY(1px)}
.cf-sales-nav__link:focus-visible{outline:3px solid var(--cf-sn-ring);outline-offset:2px}
.cf-sales-nav__link-text{position:relative;display:inline-block;transition:transform .16s ease}
.cf-sales-nav__link-text::after{content:'';position:absolute;left:0;right:0;bottom:-7px;height:3px;border-radius:999px;background:var(--accent-fill,var(--accent));transform:scaleX(0);transform-origin:0 50%;opacity:1;transition:transform .2s var(--cf-sn-ease),opacity .2s ease}
.cf-sales-nav__link:hover:not([aria-current='true']) .cf-sales-nav__link-text::after{transform:scaleX(1);opacity:.4}
.cf-sales-nav__link[aria-current='true']{color:var(--accent)}
.cf-sales-nav__link[aria-current='true'] .cf-sales-nav__link-text::after{transform:scaleX(1)}
.cf-sales-nav__actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto}
.cf-sales-nav__icon-btn{display:inline-grid;place-items:center;width:44px;height:44px;flex:0 0 auto;padding:0;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow, var(--shadow-sm));cursor:pointer;transition:background-color .16s ease,transform .16s ease}
.cf-sales-nav__icon-btn svg{width:20px;height:20px}
.cf-sales-nav__icon-btn:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-sales-nav__icon-btn:active{transform:translateY(1px)}
.cf-sales-nav__icon-btn:focus-visible{outline:3px solid var(--cf-sn-ring);outline-offset:2px}
.cf-sales-nav__cta{--cf-sn-b:var(--button-bg,var(--cta));--cf-sn-b2:var(--button-bg-2,var(--cta-2));display:inline-flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 auto;min-height:44px;padding:0 16px;border:0;margin:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--cf-sn-b) calc(l + .04) c h),oklch(from var(--cf-sn-b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cf-sn-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--cf-sn-b) calc(l - .16) c h),0 1px 2px oklch(from var(--cf-sn-shade) l c h / .3),0 8px 16px -6px oklch(from var(--cf-sn-shade) l c h / .35));transition:transform .16s ease,box-shadow .16s ease,background .16s ease,min-height .28s var(--cf-sn-ease),padding .28s var(--cf-sn-ease)}
.cf-sales-nav__cta:not(:disabled):hover,.cf-sales-nav__cta[data-state='hover']{background:linear-gradient(oklch(from var(--cf-sn-b) calc(l - .01) c h),oklch(from var(--cf-sn-b2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cf-sn-b) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--cf-sn-b) calc(l - .2) c h),0 1px 2px oklch(from var(--cf-sn-shade) l c h / .32),0 10px 18px -6px oklch(from var(--cf-sn-shade) l c h / .42))}
.cf-sales-nav__cta:not(:disabled):active,.cf-sales-nav__cta[data-state='active']{transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--cf-sn-b) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--cf-sn-b) calc(l - .16) c h),0 1px 1px oklch(from var(--cf-sn-shade) l c h / .25)}
.cf-sales-nav__cta:focus-visible{outline:3px solid var(--cf-sn-ring);outline-offset:3px}
.cf-sales-nav__cta:disabled{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:none;transform:none;cursor:not-allowed}
.cf-sales-nav__cta{gap:2px;min-height:48px}
.cf-sales-nav__cta-main{display:block;font-size:1rem;line-height:1.15}
.cf-sales-nav__cta-short{display:none}
.cf-sales-nav__cta--bar[data-short] .cf-sales-nav__cta-full{display:none}
.cf-sales-nav__cta--bar[data-short] .cf-sales-nav__cta-short{display:inline}
.cf-sales-nav__cta-sub{display:grid;grid-template-rows:1fr;font-family:var(--font-body);font-weight:600;font-size:.875rem;line-height:1.25;text-transform:none;letter-spacing:0;transition:grid-template-rows .28s var(--cf-sn-ease),opacity .2s ease}
.cf-sales-nav__cta-sub>span{min-height:0;overflow:hidden}
.cf-sales-nav__cta--bar .cf-sales-nav__cta-sub{display:none}
@container cf-sales-nav (max-width:359px){.cf-sales-nav__word{font-size:1rem}.cf-sales-nav__cta--bar{padding:0 12px}}
@container cf-sales-nav (min-width:560px){.cf-sales-nav__cta--bar[data-short] .cf-sales-nav__cta-full{display:inline}.cf-sales-nav__cta--bar[data-short] .cf-sales-nav__cta-short{display:none}.cf-sales-nav__cta--bar{min-height:48px;padding:0 20px}.cf-sales-nav__cta--bar .cf-sales-nav__cta-main{font-size:1.0625rem}.cf-sales-nav__word{font-size:1.25rem}.cf-sales-nav__mark{width:36px;height:36px}}
@container cf-sales-nav (min-width:1080px){${wide(`.cf-sales-nav[data-count='3']`)}}
@container cf-sales-nav (min-width:1240px){${wide(`.cf-sales-nav[data-count='4']`)}}
@container cf-sales-nav (min-width:1400px){${wide(`.cf-sales-nav[data-count='5']`)}}
@container cf-sales-nav (min-width:1560px){${wide(`.cf-sales-nav[data-count='6']`)}}
.cf-sales-nav__drawer{position:fixed;inset:0;z-index:60;visibility:hidden;pointer-events:none;transition:visibility 0s linear .34s}
.cf-sales-nav__drawer[data-open='true']{visibility:visible;pointer-events:auto;transition:none}
.cf-sales-nav__scrim{position:absolute;inset:0;background:oklch(from var(--band) l c h / .6);opacity:0;cursor:pointer;transition:opacity .3s ease}
.cf-sales-nav__drawer[data-open='true'] .cf-sales-nav__scrim{opacity:1}
.cf-sales-nav__panel{position:absolute;top:0;right:0;bottom:0;width:min(420px,100%);display:flex;flex-direction:column;background:var(--card);color:var(--ink);box-shadow:var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32));transform:translateX(100%);transition:transform .34s var(--cf-sn-ease)}
.cf-sales-nav__drawer[data-open='true'] .cf-sales-nav__panel{transform:none}
.cf-sales-nav__panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:68px;padding:12px var(--cf-sn-g);border-bottom:1px solid var(--cf-sn-line)}
.cf-sales-nav__panel-head .cf-sales-nav__word{font-size:1.125rem}
.cf-sales-nav__panel-head .cf-sales-nav__logo{height:32px}
.cf-sales-nav__list{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;margin:0;padding:0;list-style:none}
.cf-sales-nav__item{border-bottom:1px solid var(--cf-sn-line)}
.cf-sales-nav__panel-link{display:grid;grid-template-columns:auto 1fr;align-items:start;column-gap:16px;padding:20px var(--cf-sn-g);color:var(--ink);text-decoration:none;transition:background-color .16s ease}
.cf-sales-nav__panel-link:hover{background:var(--cf-sn-quiet)}
.cf-sales-nav__panel-link:focus-visible{outline:3px solid var(--cf-sn-ring);outline-offset:-3px}
.cf-sales-nav__panel-link[aria-current='true']{background:color-mix(in oklch,var(--accent-fill,var(--accent)) 10%,var(--card))}
.cf-sales-nav__panel-link[aria-current='true'] .cf-sales-nav__panel-detail{color:var(--ink)}
.cf-sales-nav__num{min-width:2ch;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.3125rem;line-height:1.15;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-sales-nav__panel-label{display:block;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.3125rem;line-height:1.15;letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:balance}
.cf-sales-nav__panel-detail{display:block;margin-top:6px;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-sales-nav__letter{padding:24px var(--cf-sn-g) 28px}
.cf-sales-nav__salute{margin:0 0 8px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.125rem;line-height:1.3}
.cf-sales-nav__letter-p{margin:0 0 10px;font-size:1.0625rem;line-height:1.5;text-wrap:pretty}
.cf-sales-nav__signoff{margin:14px 0 0;font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--muted)}
.cf-sales-nav__foot{flex:0 0 auto;display:grid;gap:12px;padding:16px var(--cf-sn-g) calc(16px + env(safe-area-inset-bottom,0px));background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-sales-nav__price{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:0}
.cf-sales-nav__price-big{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;color:var(--ink)}
.cf-sales-nav__price-note{font-size:.9375rem;line-height:1.35;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-sales-nav__cta--drawer{width:100%;min-height:64px;padding:10px 20px;white-space:normal}
.cf-sales-nav__cta--drawer .cf-sales-nav__cta-main{font-size:1.1875rem;text-wrap:balance}
.cf-sales-nav__fine{display:grid;gap:4px;margin:0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-sales-nav__fine svg{display:inline-block;width:16px;height:16px;vertical-align:-.18em;margin-inline-end:.4em}
.cf-sales-nav__fine-shield{color:var(--success)}
.cf-sales-nav__fine-phone{justify-self:center;color:var(--link,var(--accent));font-weight:700;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em;border-radius:4px}
.cf-sales-nav__fine-phone:hover{color:oklch(from var(--link,var(--accent)) calc(l - .08) c h);text-decoration-color:currentColor}
.cf-sales-nav__fine-phone:focus-visible{outline:3px solid var(--cf-sn-ring);outline-offset:2px}
@keyframes cf-sales-nav-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-sales-nav__drawer[data-open='true'] .cf-sales-nav__reveal{animation:cf-sales-nav-rise .45s var(--cf-sn-ease) both}
@media (prefers-reduced-motion:reduce){.cf-sales-nav *,.cf-sales-nav *::before,.cf-sales-nav *::after{transition:none !important;animation:none !important}}
`
pieces/nav/sales-nav/specimen.tsx 41 lines
import { SalesNav } from '../sales-nav'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
const sample = defaults.sample
export const states = ['default', 'hover', 'active', 'disabled']
export default function SalesNavSpecimen({ state = 'default' }: { state?: string }) {
const [guide, workbook, checklist] = sample.items
return (
<SalesNav
brandName='Funnel Starter'
logoImage={slot('logo', '') || undefined}
links={[
{ label: 'Plan your pages', href: '#plan', detail: guide.detail },
{ label: 'Write your copy', href: '#copy', detail: workbook.detail },
{ label: 'Launch without gaps', href: '#launch', detail: checklist.detail },
{ label: 'Try it risk-free', href: '#guarantee', detail: 'Backed by our 30-day money-back guarantee.' },
]}
activeHref='#plan'
label='Get the Starter Kit'
sublabel={sample.price + ' once · instant download'}
compactLabel='Get the kit'
href='#order'
trustLine={sample.guarantee.charAt(0).toUpperCase() + sample.guarantee.slice(1)}
price={sample.price}
priceBreakdown='one payment, about $1.57 a day for a month'
phone={{ label: 'Questions? Call', number: '(555) 010-4782', href: 'tel:+15550104782' }}
letter={{
salutation: 'Dear friend,',
body: [
'You don’t need another course. You need a plan you can finish.',
'The guide, workbook and checklist come in one download, so you can start mapping your first funnel today.',
],
signoff: 'Jordan, Funnel Starter',
}}
state={state as 'default' | 'hover' | 'active' | 'disabled'}
/>
)
}
| Name | Type | Details |
|---|---|---|
brandName OptionalSalesNav |
string |
Default 'Funnel Starter'
|
logoImage OptionalSalesNav |
string |
|
logoAlt OptionalSalesNav |
string |
|
homeHref OptionalSalesNav |
string |
Default '#'
|
links OptionalSalesNav |
SalesNavLink[] |
Default DEFAULT_LINKS
|
label OptionalSalesNav |
string |
Default 'Get the Starter Kit'
|
sublabel OptionalSalesNav |
string |
Default 'See everything inside'
|
compactLabel OptionalSalesNav |
string |
Default 'Get the kit'
|
href OptionalSalesNav |
string |
|
onAction OptionalSalesNav |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
trustLine OptionalSalesNav |
string |
|
price OptionalSalesNav |
string |
|
priceBreakdown OptionalSalesNav |
string |
|
phone OptionalSalesNav |
SalesNavPhone |
|
letter OptionalSalesNav |
SalesNavLetter |
|
sticky OptionalSalesNav |
boolean |
Default true
|
compact OptionalSalesNav |
boolean |
Default false
|
defaultOpen OptionalSalesNav |
boolean |
Default false
|
activeHref OptionalSalesNav |
string |
|
disabled OptionalSalesNav |
boolean |
Default false
|
state OptionalSalesNav |
'default' | 'hover' | 'active' | 'disabled' |
Default 'default'
|
copy OptionalSalesNav |
SalesNavCopy |
|
className OptionalSalesNav |
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.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
logo- The brand’s logo mark.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB