Call-to-action sections
The section that asks for the sign-up before the footer: on the theme's colored band, in a centered card, with an email form or beside a look at the product.
4 blocks below, each one file and one command. They wear whichever DressCode theme you install, in light and dark.
On the colored band
The closing promise and two actions on the theme's band color, the way the Orbit template ends its page.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/cta-band.jsoncomponents/dresscode/cta-band.tsx
// Call to action on the colored band: the closing promise of a landing page and its two actions on the
// theme's band color (dc-band switches the text and the primary button to the band's own pair; the
// outline button takes the band's colors too). Ported from the Orbit template's closing section.
import { ArrowRight } from "lucide-react"
import { Button } from "@/components/ui/button"
export default function CtaBand() {
return (
<section aria-labelledby="cta-band-title" className="dc-band py-24 sm:py-28">
<div className="mx-auto flex w-full max-w-[1200px] flex-col items-center px-5 text-center sm:px-8">
<h2 id="cta-band-title" className="dc-h max-w-[720px] text-[36px] leading-[1.06] sm:text-[56px]">
Start sending invoices today.
</h2>
<p className="mt-5 max-w-[520px] text-[17px] leading-relaxed text-pretty text-muted-foreground">
Set up in ten minutes. Free for your first three clients, no card needed.
</p>
<div className="mt-8 flex flex-wrap justify-center gap-3">
<Button size="lg" className="h-12 px-6 text-[16px] font-semibold" nativeButton={false} render={<a href="#start" />}>
Start free <ArrowRight className="size-4" aria-hidden="true" />
</Button>
<Button
size="lg"
variant="outline"
className="h-12 border-[color:var(--dc-band-edge)] bg-transparent px-6 text-[16px] font-semibold text-[color:var(--dc-band-fg)] hover:bg-[color:color-mix(in_oklab,var(--dc-band-fg)_12%,transparent)] hover:text-[color:var(--dc-band-fg)] dark:bg-transparent"
nativeButton={false}
render={<a href="#demo" />}
>
Book a demo
</Button>
</div>
</div>
</section>
)
}Centered card
A raised card on the page with a heading, a line, two actions and three small reassurances under them.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/cta-card.jsoncomponents/dresscode/cta-card.tsx
// Call to action in a centered card: a raised card on the page background with a kicker, a heading, a
// line, two actions and three small reassurances. A faint glow in the theme's accent sits behind the top
// of the card; it is decoration only.
import { ArrowRight, Check } from "lucide-react"
import { Button } from "@/components/ui/button"
const REASSURANCES = ["Free for your first three clients", "No card needed", "Cancel any time"]
export default function CtaCard() {
return (
<section aria-labelledby="cta-card-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="dc-card relative isolate mx-auto max-w-[880px] overflow-hidden px-6 py-12 text-center sm:px-12 sm:py-16">
<div
aria-hidden="true"
className="pointer-events-none absolute inset-x-0 top-0 -z-10 h-[280px]"
style={{ background: "radial-gradient(60% 100% at 50% 0%, color-mix(in oklab, var(--dc-accent) 13%, transparent), transparent)" }}
/>
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">Ready when you are</p>
<h2 id="cta-card-title" className="dc-h mx-auto mt-3 max-w-[640px] text-[32px] leading-[1.1] sm:text-[44px]">
Let your next invoice chase itself.
</h2>
<p className="mx-auto mt-4 max-w-[540px] text-[17px] leading-relaxed text-muted-foreground">
Send it in a minute. Orbit writes the reminders in your tone and tells you the moment the money lands.
</p>
<div className="mt-8 flex flex-wrap justify-center gap-3">
<Button size="lg" className="h-12 px-6 text-[16px] font-semibold" nativeButton={false} render={<a href="#start" />}>
Start free <ArrowRight className="size-4" aria-hidden="true" />
</Button>
<Button size="lg" variant="outline" className="h-12 px-6 text-[16px] font-semibold" nativeButton={false} render={<a href="#pricing" />}>
See pricing
</Button>
</div>
<ul className="mt-8 flex flex-wrap justify-center gap-x-6 gap-y-2 text-[14px] text-muted-foreground">
{REASSURANCES.map((t) => (
<li key={t} className="inline-flex items-center gap-1.5">
<Check className="size-4 text-[color:var(--dc-accent)]" aria-hidden="true" />
{t}
</li>
))}
</ul>
</div>
</div>
</section>
)
}Split with email sign-up
The promise on the left and an email form on the right that checks the address and says thank you when it is sent.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/cta-signup.jsoncomponents/dresscode/cta-signup.tsx
"use client"
// Call to action, split with an email sign-up: the promise on the left, the form on the right, on a
// faintly tinted strip. The address is checked when the field loses focus and on submit; the error is
// tied to the field. A sent form says what happens next and takes focus, so a screen reader hears it.
// Wire onSubmit to your own sign-up endpoint.
import { ArrowRight, MailCheck } from "lucide-react"
import { type FormEvent, useEffect, useId, useRef, useState } from "react"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
const valid = (v: string) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v.trim())
export default function CtaSignup() {
const id = useId()
const [email, setEmail] = useState("")
const [error, setError] = useState("")
const [sent, setSent] = useState("")
const doneRef = useRef<HTMLDivElement>(null)
const inputRef = useRef<HTMLInputElement>(null)
const returning = useRef(false)
useEffect(() => {
if (sent) doneRef.current?.focus()
else if (returning.current) inputRef.current?.focus()
}, [sent])
const check = () => {
const msg = !email.trim() ? "Enter your work email." : valid(email) ? "" : "Enter an email like name@studio.com."
setError(msg)
return !msg
}
const onSubmit = (e: FormEvent) => {
e.preventDefault()
// Send the address to your sign-up endpoint here.
if (check()) setSent(email.trim())
else inputRef.current?.focus()
}
return (
<section
aria-labelledby={`${id}-title`}
className="border-y border-border bg-[color:color-mix(in_oklab,var(--dc-ink)_3%,var(--background))] py-16 sm:py-20"
>
<div className="mx-auto grid w-full max-w-[1200px] items-center gap-10 px-5 sm:px-8 lg:grid-cols-[1fr_minmax(0,500px)] lg:gap-16">
<div className="max-w-[560px]">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">Free for your first three clients</p>
<h2 id={`${id}-title`} className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
Send your first invoice this afternoon.
</h2>
<p className="mt-4 text-[17px] leading-relaxed text-muted-foreground">
Enter your work email and we will send you a link to sign in. No password to make up, no card to type in.
</p>
</div>
<div className="w-full">
{sent ? (
<div ref={doneRef} tabIndex={-1} role="status" className="dc-card flex items-start gap-4 p-5 outline-none sm:p-6">
<span className="dc-icon size-10 shrink-0">
<MailCheck className="size-5" aria-hidden="true" />
</span>
<div className="min-w-0">
<p className="dc-h text-[19px]">Thanks, check your inbox</p>
<p className="mt-1 text-[15px] leading-relaxed text-muted-foreground">
We sent a sign-in link to <span className="font-medium wrap-anywhere text-foreground">{sent}</span>. It works for 30 minutes.
</p>
<button
type="button"
onClick={() => {
returning.current = true
setSent("")
}}
className="mt-3 rounded-sm text-[14px] font-semibold underline-offset-4 outline-none hover:underline focus-visible:ring-3 focus-visible:ring-ring/50"
>
Use a different email
</button>
</div>
</div>
) : (
<form noValidate onSubmit={onSubmit}>
<Label htmlFor={`${id}-email`} className="text-[15px] font-semibold">
Work email
</Label>
<div className="mt-2.5 flex flex-col gap-2 sm:flex-row">
<Input
ref={inputRef}
id={`${id}-email`}
type="email"
autoComplete="email"
placeholder="you@studio.com"
value={email}
onChange={(e) => {
setEmail(e.target.value)
if (error && valid(e.target.value)) setError("")
}}
onBlur={() => email && check()}
aria-invalid={error ? true : undefined}
aria-describedby={error ? `${id}-error` : `${id}-hint`}
className="h-12 bg-card px-4 text-[16px] sm:flex-1"
/>
<Button type="submit" size="lg" className="h-12 px-6 text-[16px] font-semibold">
Get started <ArrowRight className="size-4" aria-hidden="true" />
</Button>
</div>
{error ? (
<p id={`${id}-error`} className="mt-2 text-[14px] text-destructive">
{error}
</p>
) : (
<p id={`${id}-hint`} className="mt-2 text-[14px] text-muted-foreground">
We only email you about your account. No newsletters unless you ask.
</p>
)}
</form>
)}
</div>
</div>
</section>
)
}With a product picture
Copy and actions beside a small picture of the product, drawn in markup, inside one large rounded panel.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/cta-product.jsoncomponents/dresscode/cta-product.tsx
// Call to action with a product picture: copy, actions and two figures on one side; on the other, the
// month's cash-in card from the product, running off the bottom edge of one large rounded panel tinted
// with the theme's accent. The card is drawn in markup, so it wears the theme; it is a picture, hidden
// from screen readers, and the copy says what it shows. On phones the picture sits under the copy.
import { ArrowRight } from "lucide-react"
import { Button } from "@/components/ui/button"
import { cn } from "@/lib/utils"
const PAYMENTS = [
{ who: "NL", client: "Northlight", note: "Paid Nov 21 · card", amount: "$7,450.00" },
{ who: "JL", client: "Juniper Labs", note: "Paid Nov 19 · bank transfer", amount: "$2,300.00" },
{ who: "FS", client: "Fernwood Studio", note: "Due Nov 28 · reminder sent", amount: "$4,200.00", due: true },
{ who: "OB", client: "Ola Bakery", note: "Paid Nov 14 · card", amount: "$640.00", wide: true },
{ who: "KL", client: "Kato & Lee", note: "Due Dec 2 · sent Nov 18", amount: "$1,860.00", due: true, wide: true },
]
const WEEKS = [38, 52, 44, 70, 58, 82, 64, 90]
function CashCard() {
return (
<div aria-hidden="true" className="dc-card w-full p-5 pb-9 text-left text-[13px] sm:p-6 sm:pb-10">
<div className="flex items-center justify-between gap-3">
<p className="font-semibold">Cash in · November</p>
<span className="dc-pill dc-pill-hl">On track</span>
</div>
<div className="mt-4 flex items-end justify-between gap-4">
<div>
<p className="dc-num text-[30px] leading-none font-semibold tracking-tight">$18,240</p>
<p className="mt-1.5 text-muted-foreground">paid of $24,600 invoiced</p>
</div>
<div className="flex h-12 items-end gap-1">
{WEEKS.map((v, i) => (
<span
key={i}
className={cn("w-2 rounded-t-[2px]", i === WEEKS.length - 1 ? "bg-[color:var(--chart-1)]" : "bg-[color:color-mix(in_oklab,var(--chart-1)_35%,transparent)]")}
style={{ height: `${v}%` }}
/>
))}
</div>
</div>
<div className="mt-4 h-2 overflow-hidden rounded-full bg-muted">
<div className="h-full w-[74%] rounded-full bg-[color:var(--chart-1)]" />
</div>
<ul className="mt-5 divide-y divide-border border-t border-border">
{PAYMENTS.map((p) => (
<li key={p.client} className={cn("items-center gap-3 py-3", p.wide ? "hidden lg:flex" : "flex")}>
<span className="grid size-8 shrink-0 place-items-center rounded-full bg-muted text-[11px] font-bold">{p.who}</span>
<span className="min-w-0 flex-1">
<span className="block truncate font-medium">{p.client}</span>
<span className="block truncate text-[12px] text-muted-foreground">{p.note}</span>
</span>
<span className={cn("dc-num shrink-0", p.due ? "text-muted-foreground" : "font-semibold")}>{p.amount}</span>
</li>
))}
</ul>
</div>
)
}
export default function CtaProduct() {
return (
<section aria-labelledby="cta-product-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="grid overflow-hidden rounded-[calc(var(--dc-radius-card)*1.6)] border border-border bg-[color:color-mix(in_oklab,var(--dc-accent)_9%,var(--background))] lg:grid-cols-2">
<div className="px-6 pt-12 pb-10 sm:px-12 sm:pt-16 lg:py-16 lg:pr-6 lg:pl-14">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">One calm list</p>
<h2 id="cta-product-title" className="dc-h mt-3 max-w-[520px] text-[32px] leading-[1.1] sm:text-[42px]">
Know what is paid and what is still out there.
</h2>
<p className="mt-4 max-w-[480px] text-[17px] leading-relaxed text-muted-foreground">
Orbit adds up the month as payments land and nudges the clients who are late, so you can stop checking.
</p>
<div className="mt-8 flex flex-wrap gap-3">
<Button size="lg" className="h-12 px-6 text-[16px] font-semibold" nativeButton={false} render={<a href="#start" />}>
Start free <ArrowRight className="size-4" aria-hidden="true" />
</Button>
<Button size="lg" variant="outline" className="h-12 px-6 text-[16px] font-semibold" nativeButton={false} render={<a href="#tour" />}>
Take the tour
</Button>
</div>
<dl className="mt-10 grid max-w-[440px] grid-cols-2 gap-6 border-t border-border pt-6">
<div>
<dt className="sr-only">Paid sooner</dt>
<dd className="dc-num text-[26px] leading-none font-semibold tracking-tight">11 days</dd>
<dd className="mt-1.5 text-[14px] leading-snug text-muted-foreground">sooner to get paid, on average</dd>
</div>
<div>
<dt className="sr-only">Freelancers</dt>
<dd className="dc-num text-[26px] leading-none font-semibold tracking-tight">4,000+</dd>
<dd className="mt-1.5 text-[14px] leading-snug text-muted-foreground">freelancers sent an invoice last month</dd>
</div>
</dl>
</div>
<div className="flex items-end px-6 sm:px-12 lg:items-stretch lg:pt-16 lg:pr-14 lg:pl-6">
<div className="-mb-5 flex w-full max-w-[460px] lg:ml-auto">
<CashCard />
</div>
</div>
</div>
</div>
</section>
)
}