Skip to Content

Headline Card

Article or case study card for feature grids: an optional meta line, a display title, a muted description, a round arrow link at the top right and a byline pinned to the bottom so card rows align at equal height.

View as Markdown
pnpm dlx shadcn add @01orbital/headline-card

The example also uses byline, eyebrow and stats. Install them too:

pnpm dlx shadcn add @01orbital/byline @01orbital/eyebrow @01orbital/stats

Usage

"use client"

import { useState } from "react"

import {
  Byline,
  BylineDescription,
  BylineName,
} from "@/components/byline/byline"
import {
  HeadlineCard,
  HeadlineCardDescription,
  HeadlineCardFooter,
  HeadlineCardHeader,
  HeadlineCardMeta,
  HeadlineCardTitle,
} from "@/components/card/headline-card"
import { Eyebrow } from "@/components/eyebrow/eyebrow"
import { StatValue } from "@/components/stats/stats"
import { Button } from "@/components/ui/button"

// The copy: change text here, not in the markup.
const COPY = {
  eyebrow: "Ostrelle / web performance",
  title: "A smaller site. A faster first impression.",
  description:
    "How the Ostrelle team cut the weight of its product pages while keeping the details that made them theirs.",
  client: "Ostrelle",
  byline: "Sample case study · illustrative metric",
  cta: "Save case study",
  saved: "Saved",
  metric: "−42%",
} as const

/**
 * A case-study HeadlineCard on blue stock: a mono label and a large figure
 * above the headline, both in Newsreader, and the client with a save
 * button in the footer.
 */
export default function HeadlineCardCaseStudy() {
  const [saved, setSaved] = useState(false)

  return (
    <HeadlineCard className="w-full max-w-md surface-sheen [--font-display:var(--font-serif)]">
      <HeadlineCardHeader>
        <HeadlineCardMeta>
          <div className="grid gap-4">
            <Eyebrow variant="mono" tone="ink">
              {COPY.eyebrow}
            </Eyebrow>
            <StatValue className="font-display text-[5rem]/none tracking-[-0.05em]">
              {COPY.metric}
            </StatValue>
          </div>
        </HeadlineCardMeta>
        <HeadlineCardTitle className="font-display font-normal tracking-[-0.025em]">
          {COPY.title}
        </HeadlineCardTitle>
        <HeadlineCardDescription>{COPY.description}</HeadlineCardDescription>
      </HeadlineCardHeader>
      <HeadlineCardFooter>
        <Byline size="sm">
          <BylineName>{COPY.client}</BylineName>
          <BylineDescription>{COPY.byline}</BylineDescription>
        </Byline>
        <Button
          variant="outline"
          aria-pressed={saved}
          onClick={() => setSaved((v) => !v)}
        >
          {saved ? COPY.saved : COPY.cta}
        </Button>
      </HeadlineCardFooter>
    </HeadlineCard>
  )
}

Examples

Case Studyheadline-card-case-study

Example of the Headline Card as a case study on blue stock: a mono label and large serif figure above the headline, with the client and a save button in the footer.

pnpm dlx shadcn add @01orbital/headline-card-case-study

Paper Editorialheadline-card-paper-editorial

Example of the Headline Card on warm cardstock for editorial content: a mono label, a large serif headline and a byline with a save button.

pnpm dlx shadcn add @01orbital/headline-card-paper-editorial

Frost Moonheadline-card-frost-moon

Example of the Headline Card with a blue moon rising behind the top corner: a large serif headline and a short reading note that opens in the footer.

pnpm dlx shadcn add @01orbital/headline-card-frost-moon

Jade Announcementheadline-card-jade-announcement

Example of the Headline Card as a product announcement: a jade glowing edge and a sans headline, with a link to the release.

pnpm dlx shadcn add @01orbital/headline-card-jade-announcement

Linen Interviewheadline-card-linen-interview

Example of the Headline Card with a fine linen texture and tighter corners, carrying a long quotation as its headline for an interview.

pnpm dlx shadcn add @01orbital/headline-card-linen-interview

Event Date Headline Cardheadline-card-clay-event

Example of the Headline Card for an event: an oversized serif date above the headline and expandable event details in the footer.

pnpm dlx shadcn add @01orbital/headline-card-clay-event

Outline Readingheadline-card-outline-reading

Example of the Headline Card as a plain outlined reading card with no fill and a checklist that opens in the footer.

pnpm dlx shadcn add @01orbital/headline-card-outline-reading

Plum Newsletterheadline-card-plum-newsletter

Example of the Headline Card as a newsletter sign-up: a large serif headline with an email field and button in the footer.

pnpm dlx shadcn add @01orbital/headline-card-plum-newsletter

Color Wash Bandheadline-card-art-journal

Example of the Headline Card: a painted color wash band across the top and a paper body with a label, headline, byline and save button.

pnpm dlx shadcn add @01orbital/headline-card-art-journal

Shared Rowsheadline-card-shared-rows

Example of the Headline Card: two cards side by side in a Grid sharing headline, description and footer rows, so descriptions line up although the headlines differ in length.

pnpm dlx shadcn add @01orbital/headline-card-shared-rows

Field Notesheadline-card-field-notes

Example of the Headline Card composed from Card parts on warm paper, with an oversized serif title and a ruled mono byline.

pnpm dlx shadcn add @01orbital/headline-card-field-notes

Anatomy

Headline Card is built from 7 parts. In the example they nest like this:

HeadlineCard
├─ HeadlineCardHeader
│  ├─ HeadlineCardMeta
│  ├─ HeadlineCardTitle
│  └─ HeadlineCardDescription
└─ HeadlineCardFooter
  • HeadlineCard: A card for a headline, such as an article or a case study. Compose it from its parts: a HeadlineCardHeader holding an optional HeadlineCardMeta, the HeadlineCardTitle, a HeadlineCardDescription and a HeadlineCardLink, then a HeadlineCardFooter pushed to the bottom. It is the kit's Card, styled; at least 320px tall, with padding that grows from 32px to 40px on screens 42rem and wider. The title steps from 24px to 30px once the card is 24rem wide, reading the stock card-header container.
  • HeadlineCardHeader: The card's top block, which holds the meta, title, description and link. The stock card-header container, so the title steps on its width. The copy is capped at 28rem and the link sits at the far edge.
  • HeadlineCardMeta: A line above the headline, such as a category and a date. It takes any content and has no styling of its own.
  • HeadlineCardTitle: The headline, read as a level-3 heading, in the body font (Geist). Pass aria-level to change the level.
  • HeadlineCardDescription: The text under the headline, at 75% of the card's text color.
  • HeadlineCardFooter: The card's bottom row, pushed to the bottom: a wrapping flex row with the items centered and spread apart, 24px by 8px gaps, in 12px text. Put a Byline size="sm" on the left and a button or link on the right.
  • HeadlineCardLink: The round arrow link at the top right of the header. Give it an aria-label, such as "Read guide: …", since it shows only an icon; href is where it goes. className goes on the link itself.

API reference

HeadlineCard

A card for a headline, such as an article or a case study. Compose it from its parts: a HeadlineCardHeader holding an optional HeadlineCardMeta, the HeadlineCardTitle, a HeadlineCardDescription and a HeadlineCardLink, then a HeadlineCardFooter pushed to the bottom. It is the kit's Card, styled; at least 320px tall, with padding that grows from 32px to 40px on screens 42rem and wider. The title steps from 24px to 30px once the card is 24rem wide, reading the stock card-header container.

It uses the card background unless you pass a surface utility, such as surface-frost, in className. Every part takes className to restyle it.

Prop

Type

It also accepts the HTML attributes of the element it renders.

HeadlineCardHeader

The card's top block, which holds the meta, title, description and link. The stock card-header container, so the title steps on its width. The copy is capped at 28rem and the link sits at the far edge.

It accepts the HTML attributes of the element it renders.

HeadlineCardMeta

A line above the headline, such as a category and a date. It takes any content and has no styling of its own.

It accepts the HTML attributes of the element it renders.

HeadlineCardTitle

The headline, read as a level-3 heading, in the body font (Geist). Pass aria-level to change the level.

It accepts the HTML attributes of the element it renders.

HeadlineCardDescription

The text under the headline, at 75% of the card's text color.

It accepts the HTML attributes of the element it renders.

The card's bottom row, pushed to the bottom: a wrapping flex row with the items centered and spread apart, 24px by 8px gaps, in 12px text. Put a Byline size="sm" on the left and a button or link on the right.

It accepts the HTML attributes of the element it renders.

The round arrow link at the top right of the header. Give it an aria-label, such as "Read guide: …", since it shows only an icon; href is where it goes. className goes on the link itself.

It accepts the HTML attributes of the element it renders.

Dependencies

npm: @phosphor-icons/react, cn. The CLI installs them for you. cn merges Tailwind class names, in place of clsx and tailwind-merge.

Registry pieces it installs with it:

Used in blocks

2 blocks are built with Headline Card: