Skip to content

Split CTA with a visual

Copy on one side, a live component composition on the other.

Marketingstarterctasplitvisualfull-bleed

Live preview

full widthLive preview — open it in a new tab for the full-height version.
Open the preview in a new tab

Source

This exact file renders the preview above.

import { ArrowRight } from 'lucide-react'
import { ButtonLink } from '@/components/ui/button'
import { Container } from '@/components/ui/layout'
import { Badge } from '@/components/ui/badge'
import { Status } from '@/components/ui/status'

/**
 * Split CTA with a visual half
 *
 * Copy on one side, a live component composition on the other. The visual half
 * is real markup, so it re-themes and never becomes a stale screenshot — the
 * usual fate of an image-led CTA.
 */
export default function SplitImageCTA() {
  return (
    <section className="border-b border-line bg-surface-sunken">
      <Container bleed size="full" className="grid lg:grid-cols-2">
        <div className="flex flex-col justify-center px-4 py-section sm:px-8 lg:px-16">
          <Badge tone="accent">Free to evaluate</Badge>
          <h2 className="display-type mt-4 max-w-lg text-2xl leading-tight font-semibold text-ink-strong sm:text-3xl">
            See it working before you commit a single afternoon.
          </h2>
          <p className="mt-4 max-w-md text-md text-ink-muted">
            Every component page shows a live preview, the exact source behind it, and the
            accessibility contract it guarantees.
          </p>
          <div className="mt-8 flex flex-wrap gap-3">
            <ButtonLink href="/components/dialog" trailingIcon={<ArrowRight className="size-4" />}>
              Open a component page
            </ButtonLink>
            <ButtonLink href="/playground" variant="outline">
              Try the playground
            </ButtonLink>
          </div>
        </div>

        <div className="relative flex items-center justify-center border-t border-line bg-canvas px-4 py-16 sm:px-8 lg:border-t-0 lg:border-l">
          <div className="grid-paper absolute inset-0 opacity-60" aria-hidden="true" />
          <div className="relative w-full max-w-sm rounded-xl border border-line bg-surface p-5 shadow-lg">
            <div className="flex items-center justify-between">
              <p className="text-sm font-semibold text-ink-strong">Component health</p>
              <Badge size="sm" tone="success">
                Passing
              </Badge>
            </div>
            <ul className="mt-4 flex flex-col gap-2.5">
              <li>
                <Status appearance="dot" kind="operational" label="Source matches the preview" />
              </li>
              <li>
                <Status appearance="dot" kind="operational" label="Keyboard contract documented" />
              </li>
              <li>
                <Status appearance="dot" kind="operational" label="Related items all resolve" />
              </li>
              <li>
                <Status appearance="dot" kind="operational" label="Rendered in five palettes" />
              </li>
            </ul>
          </div>
        </div>
      </Container>
    </section>
  )
}

components/blocks/sections/cta/split-image.tsx

import { ArrowRight } from 'lucide-react'
import { ButtonLink } from '@/components/ui/button'
import { Container } from '@/components/ui/layout'
import { Badge } from '@/components/ui/badge'
import { Status } from '@/components/ui/status'

/**
 * Split CTA with a visual half
 *
 * Copy on one side, a live component composition on the other. The visual half
 * is real markup, so it re-themes and never becomes a stale screenshot — the
 * usual fate of an image-led CTA.
 */
export default function SplitImageCTA() {
  return (
    <section className="border-b border-line bg-surface-sunken">
      <Container bleed size="full" className="grid lg:grid-cols-2">
        <div className="flex flex-col justify-center px-4 py-section sm:px-8 lg:px-16">
          <Badge tone="accent">Free to evaluate</Badge>
          <h2 className="display-type mt-4 max-w-lg text-2xl leading-tight font-semibold text-ink-strong sm:text-3xl">
            See it working before you commit a single afternoon.
          </h2>
          <p className="mt-4 max-w-md text-md text-ink-muted">
            Every component page shows a live preview, the exact source behind it, and the
            accessibility contract it guarantees.
          </p>
          <div className="mt-8 flex flex-wrap gap-3">
            <ButtonLink href="/components/dialog" trailingIcon={<ArrowRight className="size-4" />}>
              Open a component page
            </ButtonLink>
            <ButtonLink href="/playground" variant="outline">
              Try the playground
            </ButtonLink>
          </div>
        </div>

        <div className="relative flex items-center justify-center border-t border-line bg-canvas px-4 py-16 sm:px-8 lg:border-t-0 lg:border-l">
          <div className="grid-paper absolute inset-0 opacity-60" aria-hidden="true" />
          <div className="relative w-full max-w-sm rounded-xl border border-line bg-surface p-5 shadow-lg">
            <div className="flex items-center justify-between">
              <p className="text-sm font-semibold text-ink-strong">Component health</p>
              <Badge size="sm" tone="success">
                Passing
              </Badge>
            </div>
            <ul className="mt-4 flex flex-col gap-2.5">
              <li>
                <Status appearance="dot" kind="operational" label="Source matches the preview" />
              </li>
              <li>
                <Status appearance="dot" kind="operational" label="Keyboard contract documented" />
              </li>
              <li>
                <Status appearance="dot" kind="operational" label="Related items all resolve" />
              </li>
              <li>
                <Status appearance="dot" kind="operational" label="Rendered in five palettes" />
              </li>
            </ul>
          </div>
        </div>
      </Container>
    </section>
  )
}

components/ui/status.tsx

import { CheckCircle2, AlertTriangle, XCircle, Info, CircleDashed, Clock } from 'lucide-react'
import { cn } from '@/lib/cn'

/**
 * Status
 *
 * Deliberately separate from Badge. A status describes the *state of a thing*
 * (a deployment, an invoice, a service) and therefore always pairs an icon
 * with a label — colour is the third signal, never the only one. That rule is
 * what makes the library legible to colour-blind users without a theme switch.
 */
export type StatusKind = 'operational' | 'degraded' | 'down' | 'pending' | 'info' | 'idle'

export interface StatusProps {
  kind: StatusKind
  label: string
  /** `dot` for dense tables, `pill` for standalone display. */
  appearance?: 'dot' | 'pill' | 'inline'
  className?: string
}

const config = {
  operational: {
    icon: CheckCircle2,
    text: 'text-success',
    bg: 'bg-success-soft border-success-line',
    dot: 'bg-success',
  },
  degraded: {
    icon: AlertTriangle,
    text: 'text-warning',
    bg: 'bg-warning-soft border-warning-line',
    dot: 'bg-warning',
  },
  down: {
    icon: XCircle,
    text: 'text-danger',
    bg: 'bg-danger-soft border-danger-line',
    dot: 'bg-danger',
  },
  pending: { icon: Clock, text: 'text-info', bg: 'bg-info-soft border-info-line', dot: 'bg-info' },
  info: { icon: Info, text: 'text-info', bg: 'bg-info-soft border-info-line', dot: 'bg-info' },
  idle: {
    icon: CircleDashed,
    text: 'text-ink-subtle',
    bg: 'bg-surface-sunken border-line',
    dot: 'bg-ink-subtle',
  },
} as const

export function Status({ kind, label, appearance = 'inline', className }: StatusProps) {
  const entry = config[kind]
  const Icon = entry.icon

  if (appearance === 'dot') {
    return (
      <span className={cn('inline-flex items-center gap-2 text-sm text-ink', className)}>
        <span className={cn('size-2 shrink-0 rounded-full', entry.dot)} aria-hidden="true" />
        {label}
      </span>
    )
  }

  if (appearance === 'pill') {
    return (
      <span
        className={cn(
          'inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium',
          entry.bg,
          entry.text,
          className,
        )}
      >
        <Icon className="size-3.5 shrink-0" aria-hidden="true" />
        {label}
      </span>
    )
  }

  return (
    <span
      className={cn('inline-flex items-center gap-1.5 text-sm font-medium', entry.text, className)}
    >
      <Icon className="size-4 shrink-0" aria-hidden="true" />
      {label}
    </span>
  )
}

Demo source — adapt to your project. Foundry is not published as a package.

Usage

The visual half is real markup, so it re-themes and never becomes a stale screenshot — the usual fate of an image-led CTA.

  • Full-bleed splits need their own internal padding, since the container gutter is removed.
  • The visual half should show the product, not an abstraction of it.

Variants and states

Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.

  • Full-bleed two-column
  • Live status panel
  • Stacks below lg

Accessibility

Real content
Panel contents are readable text, not an image.
Reflow
The split stacks below lg with a rule between the halves.

Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.