Skip to documentation content

Call to action blocks

Closing sections with one clear action, set in type, in a panel, or beside the product.

End with one request. If there is a second action, make it the smaller commitment.

Editorial closing statement

A large closing line and one action, with a rule above and quiet around it.

npx honestui@latest add cta-editorial-statement
cta-editorial-statement.tsx
import * as React from "react"

import { ActionGroup } from "@/components/marketing/foundation/action-group"
import {
  MarketingContainer,
  MarketingSection,
} from "@/components/marketing/foundation/section"
import { MarketingHeading } from "@/components/marketing/foundation/section-heading"
import type { MarketingAction } from "@/components/marketing/foundation/types"

interface CtaEditorialStatementProps {
  title?: React.ReactNode
  description?: React.ReactNode
  actions?: MarketingAction[]
  /** An anchor for links within the page. */
  id?: string
  className?: string
}

/** A large closing line, one action, and a lot of quiet around them. */
export function CtaEditorialStatement({
  title = "Send the next one for approval, not for feedback.",
  description = "Bring one document and the people who sign it. Most teams publish their first version the same week.",
  actions = [{ label: "Start free", href: "#start" }],
  id,
  className,
}: CtaEditorialStatementProps) {
  const titleId = React.useId()

  return (
    <MarketingSection
      aria-labelledby={titleId}
      id={id}
      className={className}
      style={{ paddingBlock: "clamp(4rem, 2.5rem + 6vw, 8rem)" }}
    >
      <MarketingContainer>
        <div className="grid gap-x-(--mkt-column-gap) gap-y-8 border-t-[0.5px] border-(--mkt-line-strong) pt-[clamp(3rem,2rem+4vw,6rem)] lg:grid-cols-12 lg:[align-items:last_baseline]">
          <MarketingHeading
            size="hero"
            id={titleId}
            className="-ms-[0.04em] max-w-[11.5em] lg:col-span-8"
          >
            {title}
          </MarketingHeading>
          <div className="max-w-[28rem] lg:col-span-4">
            <p className="mkt-lead">{description}</p>
            <ActionGroup actions={actions} className="mt-7" />
          </div>
        </div>
      </MarketingContainer>
    </MarketingSection>
  )
}

export type { CtaEditorialStatementProps }
DetailGuidance
Use it forThe end of a detailed page.
ContentA headline of six to ten words and one action.
OptionalThe description.
StatesNone.
RequiresFoundation, Button
Goes well withCentered questions, Product directory footer

Contained action panel

A contrasting panel, dark in the light theme and raised in the dark one. It follows the shared width and corners.

npx honestui@latest add cta-contained-panel
cta-contained-panel.tsx
import * as React from "react"

import { ActionGroup } from "@/components/marketing/foundation/action-group"
import {
  MarketingContainer,
  MarketingSection,
} from "@/components/marketing/foundation/section"
import { MarketingHeading } from "@/components/marketing/foundation/section-heading"
import type { MarketingAction } from "@/components/marketing/foundation/types"

interface CtaContainedPanelProps {
  title?: React.ReactNode
  description?: React.ReactNode
  actions?: MarketingAction[]
  /** An anchor for links within the page. */
  id?: string
  className?: string
}

const DEFAULT_ACTIONS: MarketingAction[] = [
  { label: "Start free", href: "#start" },
  { label: "Book a demo", href: "#demo" },
]

/** One contrasting panel: the line on the left, the actions on the right. */
export function CtaContainedPanel({
  title = "Try it on the document you are waiting on.",
  description = "Reviewers are free, and so are your first ten documents.",
  actions = DEFAULT_ACTIONS,
  id,
  className,
}: CtaContainedPanelProps) {
  const titleId = React.useId()

  return (
    <MarketingSection aria-labelledby={titleId} id={id} className={className}>
      <MarketingContainer>
        <div
          data-theme="dark"
          data-mkt-surface="inverse"
          className="flex flex-col gap-8 rounded-(--mkt-radius-panel) bg-(--mkt-inverse) p-7 text-(--mkt-ink) sm:p-11 lg:flex-row lg:items-end lg:justify-between lg:gap-14 lg:px-14 lg:py-16"
        >
          <div className="max-w-[38rem]">
            <MarketingHeading id={titleId}>{title}</MarketingHeading>
            {description && <p className="mkt-lead mt-4">{description}</p>}
          </div>
          <ActionGroup actions={actions} className="shrink-0" />
        </div>
      </MarketingContainer>
    </MarketingSection>
  )
}

export type { CtaContainedPanelProps }
DetailGuidance
Use it forThe middle of a page or a compact ending.
ContentA headline under nine words and up to two actions.
OptionalThe description and the second action.
StatesNone.
RequiresFoundation, Button
Goes well withDivided customer grid, Customer story with results

Closing message with product crop

The message beside the part of the product it asks you to use.

npx honestui@latest add cta-product-supported
cta-product-supported.tsx
import * as React from "react"

import { ActionGroup } from "@/components/marketing/foundation/action-group"
import {
  ProductFrame,
  ProductStage,
  type StageGround,
} from "@/components/marketing/foundation/product-frame"
import {
  MarketingContainer,
  MarketingSection,
} from "@/components/marketing/foundation/section"
import { MarketingHeading } from "@/components/marketing/foundation/section-heading"
import { StageBackdrop } from "@/components/marketing/foundation/stage-backdrop"
import type { MarketingAction } from "@/components/marketing/foundation/types"
import { WorkflowStepsScene } from "@/components/marketing/scenes/workflow-steps"

interface CtaProductSupportedProps {
  title?: React.ReactNode
  description?: React.ReactNode
  actions?: MarketingAction[]
  /** What the frame stands on: an image, an element, or null for a flat tint. */
  backdrop?: StageGround
  /** Replaces the default product scene. */
  visual?: React.ReactNode
  /** An anchor for links within the page. */
  id?: string
  className?: string
}

const DEFAULT_ACTIONS: MarketingAction[] = [
  { label: "Start free", href: "#start" },
  { label: "Book a demo", href: "#demo" },
]

/** The closing message beside the thing it asks you to set up. */
export function CtaProductSupported({
  title = "Set up your first approval in ten minutes.",
  description = "Choose a document, name the people, pick a date. Recto does the asking.",
  actions = DEFAULT_ACTIONS,
  backdrop = <StageBackdrop />,
  visual,
  id,
  className,
}: CtaProductSupportedProps) {
  const titleId = React.useId()

  return (
    <MarketingSection aria-labelledby={titleId} id={id} className={className}>
      <MarketingContainer>
        <div className="grid overflow-hidden rounded-(--mkt-radius-panel) bg-(--mkt-wash) lg:grid-cols-12">
          <div className="flex flex-col p-7 sm:p-11 lg:col-span-5 lg:p-14 lg:pe-8">
            <MarketingHeading id={titleId}>{title}</MarketingHeading>
            <p className="mkt-lead mt-5">{description}</p>
            <ActionGroup actions={actions} className="mt-8 lg:mt-auto lg:pt-14" />
          </div>
          <ProductStage
            backdrop={backdrop}
            className="flex items-center rounded-none px-5 py-10 sm:px-14 lg:col-span-7 lg:min-h-[33rem]"
          >
            {visual ?? (
              <ProductFrame
                label="The five steps of an approval, from draft to publish. Three are complete and Support is due on Thursday."
                className="mx-auto w-full max-w-[27rem]"
              >
                <WorkflowStepsScene />
              </ProductFrame>
            )}
          </ProductStage>
        </div>
      </MarketingContainer>
    </MarketingSection>
  )
}

export type { CtaProductSupportedProps }
DetailGuidance
Use it forThe end of a product page.
ContentA headline under eight words, one sentence, up to two actions, and one scene.
OptionalThe backdrop and the second action.
StatesNone.
RequiresFoundation, product scenes, Button
Goes well withSplit questions with contact, Product directory footer

Usage

Every prop has a default, so a block renders as soon as it is installed. Pass your own content to replace it.

import { CtaContainedPanel } from "@/components/marketing/cta-contained-panel"

<CtaContainedPanel
  title="Try it on the document you are waiting on."
  actions={[{ label: "Start free", href: "/sign-up" }]}
/>

CtaProductSupported

PropTypeDefaultDescription
titleReactNode–The closing line.
actionsMarketingAction[]–The first is primary.
visualReactNode–Replaces the default product scene.